Merge "Handle all text bounds as post-translated"
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index a2f7dbe..5b6cff0 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -602,6 +602,7 @@
int bytesCount = glyphsCount * sizeof(jchar);
const SkRect& r = value->getBounds();
android::uirenderer::Rect bounds(r.fLeft, r.fTop, r.fRight, r.fBottom);
+ bounds.translate(x, y);
renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
@@ -637,6 +638,7 @@
int bytesCount = glyphsCount * sizeof(jchar);
const SkRect& r = value->getBounds();
android::uirenderer::Rect bounds(r.fLeft, r.fTop, r.fRight, r.fBottom);
+ bounds.translate(x, y);
renderer->drawText((const char*) glyphs, bytesCount, glyphsCount,
x + xOffsetForTextAlign(paint, totalAdvance), y, positions,
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index 6b7bac0..f678bfd 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -1295,7 +1295,6 @@
const float* positions, SkPaint* paint, float totalAdvance, const Rect& bounds)
: DrawBoundedOp(bounds, paint), mText(text), mBytesCount(bytesCount), mCount(count),
mX(x), mY(y), mPositions(positions), mTotalAdvance(totalAdvance) {
- mLocalBounds.translate(x,y);
memset(&mPrecacheTransform.data[0], 0xff, 16 * sizeof(float));
}