Update 9patch structure when rendering with different divs/colors.
Bug #3221488
Change-Id: Ifc9e42a991d630feadc9e8032322f37504d09d6d
diff --git a/libs/hwui/Line.h b/libs/hwui/Line.h
index 5c6f3d8..264fd19 100644
--- a/libs/hwui/Line.h
+++ b/libs/hwui/Line.h
@@ -58,6 +58,8 @@
mXDivs[0] = mYDivs[0] = 2;
mXDivs[1] = mYDivs[1] = 3;
+ mPatch->copy(mXDivs, mYDivs);
+
glGenTextures(1, &mTexture);
glBindTexture(GL_TEXTURE_2D, mTexture);
@@ -89,8 +91,7 @@
const float half = lineWidth * 0.5f;
mPatch->updateVertices(gLineTextureWidth, gLineTextureHeight,
- -gLineAABias, -half - gLineAABias, length + gLineAABias, half + gLineAABias,
- mXDivs, mYDivs, mXDivsCount, mYDivsCount);
+ -gLineAABias, -half - gLineAABias, length + gLineAABias, half + gLineAABias);
tx = -gLineAABias;
ty = lineWidth <= 1.0f ? -gLineAABias : -half - gLineAABias;