summaryrefslogtreecommitdiffstats
path: root/libs/hwui/RenderProperties.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-05-13 16:33:04 -0700
committerChris Craik <ccraik@google.com>2015-05-13 16:47:19 -0700
commit1a0808e64c170fa7b620b858fa5875f6f08a2b54 (patch)
tree6503695e18d11985a9a86257bd78ddced75e3e13 /libs/hwui/RenderProperties.h
parent55e603ee9de06125751292c84f1b25fb9a78d4e4 (diff)
downloadframeworks_base-1a0808e64c170fa7b620b858fa5875f6f08a2b54.zip
frameworks_base-1a0808e64c170fa7b620b858fa5875f6f08a2b54.tar.gz
frameworks_base-1a0808e64c170fa7b620b858fa5875f6f08a2b54.tar.bz2
Add back alpha atrace log
bug:20922838 Change-Id: I70ccbffdd5f140cd1dd71fbf456fb5b085e74a4a
Diffstat (limited to 'libs/hwui/RenderProperties.h')
-rw-r--r--libs/hwui/RenderProperties.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index a43566d..98029a8 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -576,15 +576,15 @@ public:
&& getOutline().getAlpha() != 0.0f;
}
- LayerType effectiveLayerType() const {
- LayerType type = mLayerProperties.mType;
- if (type == LayerType::None
+ bool promotedToLayer() const {
+ return mLayerProperties.mType == LayerType::None
&& !MathUtils::isZero(mPrimitiveFields.mAlpha)
&& mPrimitiveFields.mAlpha < 1
- && mPrimitiveFields.mHasOverlappingRendering) {
- return LayerType::RenderLayer;
- }
- return type;
+ && mPrimitiveFields.mHasOverlappingRendering;
+ }
+
+ LayerType effectiveLayerType() const {
+ return promotedToLayer() ? LayerType::RenderLayer : mLayerProperties.mType;
}
private: