summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.cpp
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2018-09-28 18:44:26 -0400
committerStan Iliev <stani@google.com>2018-10-01 09:46:00 -0400
commit8fc3d8e09d7788a96559d31dc502e99fce4f1378 (patch)
tree0758b9093a3af01471bda069359d7404031fd9f3 /libs/hwui/Layer.cpp
parenta810c7efe4b47d4d5ba4ed41b86c90fe2a604d95 (diff)
Disable blending for opaque TextureView
Opaque TextureView (set by TextureView.setOpaque(true), should draw with SRC blending, which in practice disables GL blending. Test: Ran Naver app, which is using opaque TextureView Bug: 113845024 Change-Id: I5daa455a72b0ded50d6f9578f3b8a8701532f9d4
Diffstat (limited to 'libs/hwui/Layer.cpp')
-rw-r--r--libs/hwui/Layer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index cc95051fc952..32aaa54e696c 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -77,5 +77,13 @@ void Layer::postDecStrong() {
mRenderState.postDecStrong(this);
}
+SkBlendMode Layer::getMode() const {
+ if (mBlend || mode != SkBlendMode::kSrcOver) {
+ return mode;
+ } else {
+ return SkBlendMode::kSrc;
+ }
+}
+
}; // namespace uirenderer
}; // namespace android