Handle all text bounds as post-translated
We were treating immediate mode bounds as pre translate, which is
inconsistent with using them for quickRejection.
This fixes the overdraw counter not drawing correctly (since it uses
immediate mode drawing.
Change-Id: I1c734d367a00942bd7d9b041822c0a9f284e70a8
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index f3592a3..3aae198 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,