diff options
author | John Reck <jreck@google.com> | 2015-08-05 13:53:53 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-08-26 16:29:15 -0700 |
commit | e248bd1b2c3fcf8088429507e73b31f45ee2544b (patch) | |
tree | 11b5ca9ab43877438cc05101ca0c8c2c95bfb6bd /libs/hwui/RenderProperties.h | |
parent | c0877bb0ff769f09e9e60f600bdd294f1aac8331 (diff) |
Serializing display lists
This is a WIP prototype
Change-Id: Id4bfcf2b7bf905221c3734b7b6887c9b2efd37e6
Diffstat (limited to 'libs/hwui/RenderProperties.h')
-rw-r--r-- | libs/hwui/RenderProperties.h | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index 11abd701b9d8..71589c802749 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -417,7 +417,7 @@ public: return false; } - float getLeft() const { + int getLeft() const { return mPrimitiveFields.mLeft; } @@ -432,7 +432,7 @@ public: return false; } - float getTop() const { + int getTop() const { return mPrimitiveFields.mTop; } @@ -447,7 +447,7 @@ public: return false; } - float getRight() const { + int getRight() const { return mPrimitiveFields.mRight; } @@ -462,7 +462,7 @@ public: return false; } - float getBottom() const { + int getBottom() const { return mPrimitiveFields.mBottom; } @@ -541,6 +541,10 @@ public: return mPrimitiveFields.mClippingFlags & CLIP_TO_BOUNDS; } + const Rect& getClipBounds() const { + return mPrimitiveFields.mClipBounds; + } + void getClippingRectForFlags(uint32_t flags, Rect* outRect) const { if (flags & CLIP_TO_BOUNDS) { outRect->set(0, 0, getWidth(), getHeight()); @@ -621,25 +625,23 @@ public: private: // Rendering properties struct PrimitiveFields { - PrimitiveFields(); - + int mLeft = 0, mTop = 0, mRight = 0, mBottom = 0; + int mWidth = 0, mHeight = 0; + int mClippingFlags = CLIP_TO_BOUNDS; + float mAlpha = 1; + float mTranslationX = 0, mTranslationY = 0, mTranslationZ = 0; + float mElevation = 0; + float mRotation = 0, mRotationX = 0, mRotationY = 0; + float mScaleX = 1, mScaleY = 1; + float mPivotX = 0, mPivotY = 0; + bool mHasOverlappingRendering = false; + bool mPivotExplicitlySet = false; + bool mMatrixOrPivotDirty = false; + bool mProjectBackwards = false; + bool mProjectionReceiver = false; + Rect mClipBounds; Outline mOutline; RevealClip mRevealClip; - int mClippingFlags; - bool mProjectBackwards; - bool mProjectionReceiver; - float mAlpha; - bool mHasOverlappingRendering; - float mElevation; - float mTranslationX, mTranslationY, mTranslationZ; - float mRotation, mRotationX, mRotationY; - float mScaleX, mScaleY; - float mPivotX, mPivotY; - int mLeft, mTop, mRight, mBottom; - int mWidth, mHeight; - bool mPivotExplicitlySet; - bool mMatrixOrPivotDirty; - Rect mClipBounds; } mPrimitiveFields; SkMatrix* mStaticMatrix; |