29 m_hardwareVertexArray =
nullptr;
30 m_hardwareTextureCoordArray =
nullptr;
31 m_hardwareCached =
false;
32 m_hardwareCaching =
false;
37 delete m_hardwareVertexArray;
38 delete m_hardwareTextureCoordArray;
43 int left = dest.
left();
44 int right = dest.
right();
46 int bottom = dest.
bottom();
47 int width = dest.
width();
48 int height = dest.
height();
49 int w = innerLineWidth;
53 addRect(
Rect(left + w, bottom - w + 1, width - w, w));
63 for(
int y = 0; y <= virtualDest.
height(); y += src.
height()) {
64 for(
int x = 0; x <= virtualDest.
width(); x += src.
width()) {
73 if(partialDest.
right() > virtualDest.
right()) {
79 m_vertexArray.
addRect(partialDest);
80 m_textureCoordArray.
addRect(partialSrc);
83 m_hardwareCached =
false;
91 m_hardwareCacheMode = usagePattern;
92 m_hardwareCaching =
true;
93 m_hardwareCached =
false;
98 if(!m_hardwareCaching || m_hardwareCached)
104 if(vertexCount < CACHE_MIN_VERTICES_COUNT)
107 if(vertexCount > 0) {
108 if(!m_hardwareVertexArray && m_vertexArray.
vertexCount() > 0)
110 m_hardwareVertexArray->
bind();
111 m_hardwareVertexArray->
write((
void*)m_vertexArray.
vertices(), m_vertexArray.
size() *
sizeof(
float), m_hardwareCacheMode);
115 if(!m_hardwareTextureCoordArray && m_textureCoordArray.
vertexCount() > 0)
117 m_hardwareTextureCoordArray->
bind();
118 m_hardwareTextureCoordArray->
write((
void*)m_textureCoordArray.
vertices(), m_textureCoordArray.
size() *
sizeof(
float), m_hardwareCacheMode);
121 m_hardwareCached =
true;