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

Unified Diff: src/core/SkRecordOpts.cpp

Issue 849243002: Why are we afraid of saveLayer() bounds? (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | tests/RecordOptsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordOpts.cpp
diff --git a/src/core/SkRecordOpts.cpp b/src/core/SkRecordOpts.cpp
index 4a51beea001df2d138dcc218fff401892859ae0c..7ab80546d952a1ac031626176db35c4a34a0b417 100644
--- a/src/core/SkRecordOpts.cpp
+++ b/src/core/SkRecordOpts.cpp
@@ -90,13 +90,8 @@ struct SaveLayerDrawRestoreNooper {
typedef Pattern3<Is<SaveLayer>, IsDraw, Is<Restore> > Pattern;
bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
- SaveLayer* saveLayer = pattern->first<SaveLayer>();
- if (saveLayer->bounds != NULL) {
- // SaveLayer with bounds is too tricky for us.
- return false;
- }
-
- SkPaint* layerPaint = saveLayer->paint;
+ // A SaveLayer's bounds field is just a hint, so we should be free to ignore it.
+ SkPaint* layerPaint = pattern->first<SaveLayer>()->paint;
if (NULL == layerPaint) {
// There wasn't really any point to this SaveLayer at all.
return KillSaveLayerAndRestore(record, begin);
« no previous file with comments | « no previous file | tests/RecordOptsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698