summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorYuqian Li <liyuqian@google.com>2016-09-14 11:14:06 -0400
committerYuqian Li <liyuqian@google.com>2016-09-14 11:44:10 -0400
commit83427ff2224c89cc1a590ea609206c95c8ee039e (patch)
tree28b89517ad0d6c7d298c650faae95e11a35579d5 /libs
parent4efd735a7605a88bcf0228de94d99a563b0f64d8 (diff)
downloadandroid-frameworks-base-83427ff2224c89cc1a590ea609206c95c8ee039e.tar.gz
android-frameworks-base-83427ff2224c89cc1a590ea609206c95c8ee039e.tar.xz
Ignore HasAlphaLayer flag to fix b/30929229
BUG:30929229 Change-Id: Iebadc6b3d224efa0554cbbb99ea43f871c28722b
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/SkiaCanvas.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp
index ce67554..c7289fc 100644
--- a/libs/hwui/SkiaCanvas.cpp
+++ b/libs/hwui/SkiaCanvas.cpp
@@ -329,9 +329,10 @@ void SkiaCanvas::restoreToCount(int restoreCount) {
static inline SkCanvas::SaveLayerFlags layerFlags(SaveFlags::Flags flags) {
SkCanvas::SaveLayerFlags layerFlags = 0;
- if (!(flags & SaveFlags::HasAlphaLayer)) {
- layerFlags |= SkCanvas::kIsOpaque_SaveLayerFlag;
- }
+ // We intentionally ignore the SaveFlags::HasAlphaLayer and
+ // SkCanvas::kIsOpaque_SaveLayerFlag flags because HWUI ignores it
+ // and our Android client may use it incorrectly.
+ // In Skia, this flag is purely for performance optimization.
if (!(flags & SaveFlags::ClipToLayer)) {
layerFlags |= SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag;