diff options
author | Yuqian Li <liyuqian@google.com> | 2017-02-23 10:28:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-23 16:17:08 +0000 |
commit | d196cbe9c270799a6edb6e110ab647c5a4a850a2 (patch) | |
tree | fa76a074f807f89147ef5de64d1fa350013aef18 /src | |
parent | a979a1d39dae9944a25d81fa6740d4eced9bbdab (diff) |
Do not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set
This affects the Android CTS test
android.uirendering.cts.testclasses.LayerTests#testSaveLayerUnclippedWithAlpha
BUG=skia:
Change-Id: Idae150e7e4f7ed9a1a225c382ba0b40d3f840937
Reviewed-on: https://skia-review.googlesource.com/8892
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkRecordOpts.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkRecordOpts.cpp b/src/core/SkRecordOpts.cpp index 605caa3b06..bd8364fcda 100644 --- a/src/core/SkRecordOpts.cpp +++ b/src/core/SkRecordOpts.cpp @@ -192,6 +192,11 @@ struct SaveLayerDrawRestoreNooper { return false; } + if (match->first<SaveLayer>()->saveLayerFlags & (1U << 31)) { + // can't throw away the layer if the kDontClipToLayer_PrivateSaveLayerFlag is set + return false; + } + // A SaveLayer's bounds field is just a hint, so we should be free to ignore it. SkPaint* layerPaint = match->first<SaveLayer>()->paint; SkPaint* drawPaint = match->second<SkPaint>(); |