Skip to content

Commit 9caa8db

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Correctly pre-clip paths when recording display lists"
2 parents 6a2defc + 95c21d0 commit 9caa8db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libs/hwui/DisplayListRenderer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ status_t DisplayListRenderer::drawBitmap(SkBitmap* bitmap, float srcLeft, float
15521552

15531553
status_t DisplayListRenderer::drawBitmapData(SkBitmap* bitmap, float left, float top,
15541554
SkPaint* paint) {
1555-
const bool reject = quickReject(left, top, left + bitmap->width(), bitmap->height());
1555+
const bool reject = quickReject(left, top, left + bitmap->width(), top + bitmap->height());
15561556
uint32_t* location = addOp(DisplayList::DrawBitmapData, reject);
15571557
addBitmapData(bitmap);
15581558
addPoint(left, top);
@@ -1659,7 +1659,10 @@ status_t DisplayListRenderer::drawPath(SkPath* path, SkPaint* paint) {
16591659
uint32_t width, height;
16601660
computePathBounds(path, paint, left, top, offset, width, height);
16611661

1662-
const bool reject = quickReject(left - offset, top - offset, width, height);
1662+
left -= offset;
1663+
top -= offset;
1664+
1665+
const bool reject = quickReject(left, top, left + width, top + height);
16631666
uint32_t* location = addOp(DisplayList::DrawPath, reject);
16641667
addPath(path);
16651668
addPaint(paint);

0 commit comments

Comments
 (0)