aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecordOpts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkRecordOpts.cpp')
-rw-r--r--src/core/SkRecordOpts.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkRecordOpts.cpp b/src/core/SkRecordOpts.cpp
index 3302d0cb4d..47718e102c 100644
--- a/src/core/SkRecordOpts.cpp
+++ b/src/core/SkRecordOpts.cpp
@@ -55,8 +55,10 @@ struct SaveOnlyDrawsRestoreNooper {
// Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual no-ops.
struct SaveNoDrawsRestoreNooper {
// Star matches greedily, so we also have to exclude Save and Restore.
+ // Nested SaveLayers need to be excluded, or we'll match their Restore!
typedef Pattern3<Is<Save>,
- Star<Not<Or3<Is<Save>,
+ Star<Not<Or4<Is<Save>,
+ Is<SaveLayer>,
Is<Restore>,
IsDraw> > >,
Is<Restore> >