diff options
Diffstat (limited to 'libs/hwui/RenderProperties.h')
| -rw-r--r-- | libs/hwui/RenderProperties.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index 31c4f22..61e98d2 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -26,8 +26,8 @@ #include <SkCamera.h> #include <SkMatrix.h> #include <SkRegion.h> +#include <SkXfermode.h> -#include "Animator.h" #include "Rect.h" #include "RevealClip.h" #include "Outline.h" @@ -49,12 +49,12 @@ class RenderProperties; #define RP_SET_AND_DIRTY(a, b) RP_SET(a, b, mPrimitiveFields.mMatrixOrPivotDirty = true) // Keep in sync with View.java:LAYER_TYPE_* -enum LayerType { - kLayerTypeNone = 0, +enum class LayerType { + None = 0, // Although we cannot build the software layer directly (must be done at // record time), this information is used when applying alpha. - kLayerTypeSoftware = 1, - kLayerTypeRenderLayer = 2, + Software = 1, + RenderLayer = 2, // TODO: LayerTypeSurfaceTexture? Maybe? }; @@ -124,12 +124,12 @@ private: friend class RenderProperties; - LayerType mType; + LayerType mType = LayerType::None; // Whether or not that Layer's content is opaque, doesn't include alpha bool mOpaque; uint8_t mAlpha; SkXfermode::Mode mMode; - SkColorFilter* mColorFilter; + SkColorFilter* mColorFilter = nullptr; }; /* @@ -188,7 +188,7 @@ public: if (matrix) { mStaticMatrix = new SkMatrix(*matrix); } else { - mStaticMatrix = NULL; + mStaticMatrix = nullptr; } return true; } @@ -203,7 +203,7 @@ public: if (matrix) { mAnimationMatrix = new SkMatrix(*matrix); } else { - mAnimationMatrix = NULL; + mAnimationMatrix = nullptr; } return true; } @@ -571,7 +571,7 @@ public: bool hasShadow() const { return getZ() > 0.0f - && getOutline().getPath() != NULL + && getOutline().getPath() != nullptr && getOutline().getAlpha() != 0.0f; } |
