summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2013-05-09 09:49:41 -0400
committerDerek Sollenberger <djsollen@google.com>2013-05-09 14:00:29 -0400
commit708144e828b1a549567ce50cd8ed3cda62930501 (patch)
treeb7a645dece3a736d2964622f3b03f682d2dc952f /core/jni
parent2c76016cbc1e426ab30d322745dfb6d4e6784138 (diff)
downloadframeworks_base-708144e828b1a549567ce50cd8ed3cda62930501.zip
frameworks_base-708144e828b1a549567ce50cd8ed3cda62930501.tar.gz
frameworks_base-708144e828b1a549567ce50cd8ed3cda62930501.tar.bz2
Fix bug where we incorrectly clipped the bounds to the device size.
This CL also updates the documenation to make it clear that the API returns in local space, not clipped to the size of the bitmap/device. bug: 8747526 Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android/graphics/Canvas.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp
index 11c7053..eb97a9c 100644
--- a/core/jni/android/graphics/Canvas.cpp
+++ b/core/jni/android/graphics/Canvas.cpp
@@ -964,16 +964,10 @@ static void doDrawTextDecorations(SkCanvas* canvas, jfloat x, jfloat y, jfloat l
jobject bounds) {
SkRect r;
SkIRect ir;
- bool result = canvas->getClipBounds(&r);
+ bool result = canvas->getClipBounds(&r);
if (!result) {
r.setEmpty();
- } else {
- // ensure the clip is not larger than the canvas
- SkRect canvasRect;
- SkISize deviceSize = canvas->getDeviceSize();
- canvasRect.iset(0, 0, deviceSize.fWidth, deviceSize.fHeight);
- r.intersect(canvasRect);
}
r.round(&ir);