Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/core/SkCanvas.cpp

Issue 2352083004: Turn off quickReject() for Android framework drawables
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index e53a104c47fa28406f1d440dbcd670365d877a24..5d517801e4affc11b864c5b4edc1430f291f22a6 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -3013,6 +3013,9 @@ void SkCanvas::drawDrawable(SkDrawable* dr, const SkMatrix* matrix) {
}
void SkCanvas::onDrawDrawable(SkDrawable* dr, const SkMatrix* matrix) {
+// b/31304115
+// We cannot trust that the clip bounds are set correctly by the framework.
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
SkRect bounds = dr->getBounds();
if (matrix) {
matrix->mapRect(&bounds);
@@ -3020,6 +3023,8 @@ void SkCanvas::onDrawDrawable(SkDrawable* dr, const SkMatrix* matrix) {
if (this->quickReject(bounds)) {
return;
}
+#endif
+
dr->draw(this, matrix);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698