Loading libs/hwui/Patch.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,10 @@ void Patch::updateVertices(const float bitmapWidth, const float bitmapHeight, float v2 = fmax(0.0f, stepY - 0.5f) / bitmapHeight; if (stepY > 0.0f) { if (i == mYCount - 1 && mYDivs[i] == bitmapHeight) { y2 = bottom - top; v2 = 1.0f; } generateRow(vertex, y1, y2, v1, v2, stretchX, right - left, bitmapWidth, quadCount); } Loading @@ -177,8 +181,10 @@ void Patch::updateVertices(const float bitmapWidth, const float bitmapHeight, previousStepY = stepY; } if (previousStepY != bitmapHeight) { generateRow(vertex, y1, bottom - top, v1, 1.0f, stretchX, right - left, bitmapWidth, quadCount); } if (verticesCount > 0) { Caches::getInstance().bindMeshBuffer(meshBuffer); Loading Loading @@ -216,6 +222,10 @@ void Patch::generateRow(TextureVertex*& vertex, float y1, float y2, float v1, fl float u2 = fmax(0.0f, stepX - 0.5f) / bitmapWidth; if (stepX > 0.0f) { if (i == mXCount - 1 && mXDivs[i] == bitmapWidth) { x2 = bitmapWidth; u2 = 1.0f; } generateQuad(vertex, x1, y1, x2, y2, u1, v1, u2, v2, quadCount); } Loading @@ -225,8 +235,10 @@ void Patch::generateRow(TextureVertex*& vertex, float y1, float y2, float v1, fl previousStepX = stepX; } if (previousStepX != bitmapWidth) { generateQuad(vertex, x1, y1, width, y2, u1, v1, 1.0f, v2, quadCount); } } void Patch::generateQuad(TextureVertex*& vertex, float x1, float y1, float x2, float y2, float u1, float v1, float u2, float v2, uint32_t& quadCount) { Loading Loading
libs/hwui/Patch.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,10 @@ void Patch::updateVertices(const float bitmapWidth, const float bitmapHeight, float v2 = fmax(0.0f, stepY - 0.5f) / bitmapHeight; if (stepY > 0.0f) { if (i == mYCount - 1 && mYDivs[i] == bitmapHeight) { y2 = bottom - top; v2 = 1.0f; } generateRow(vertex, y1, y2, v1, v2, stretchX, right - left, bitmapWidth, quadCount); } Loading @@ -177,8 +181,10 @@ void Patch::updateVertices(const float bitmapWidth, const float bitmapHeight, previousStepY = stepY; } if (previousStepY != bitmapHeight) { generateRow(vertex, y1, bottom - top, v1, 1.0f, stretchX, right - left, bitmapWidth, quadCount); } if (verticesCount > 0) { Caches::getInstance().bindMeshBuffer(meshBuffer); Loading Loading @@ -216,6 +222,10 @@ void Patch::generateRow(TextureVertex*& vertex, float y1, float y2, float v1, fl float u2 = fmax(0.0f, stepX - 0.5f) / bitmapWidth; if (stepX > 0.0f) { if (i == mXCount - 1 && mXDivs[i] == bitmapWidth) { x2 = bitmapWidth; u2 = 1.0f; } generateQuad(vertex, x1, y1, x2, y2, u1, v1, u2, v2, quadCount); } Loading @@ -225,8 +235,10 @@ void Patch::generateRow(TextureVertex*& vertex, float y1, float y2, float v1, fl previousStepX = stepX; } if (previousStepX != bitmapWidth) { generateQuad(vertex, x1, y1, width, y2, u1, v1, 1.0f, v2, quadCount); } } void Patch::generateQuad(TextureVertex*& vertex, float x1, float y1, float x2, float y2, float u1, float v1, float u2, float v2, uint32_t& quadCount) { Loading