diff options
Diffstat (limited to 'libs/hwui/VertexBuffer.h')
| -rw-r--r-- | libs/hwui/VertexBuffer.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/libs/hwui/VertexBuffer.h b/libs/hwui/VertexBuffer.h index 8c3a272..9be4d84 100644 --- a/libs/hwui/VertexBuffer.h +++ b/libs/hwui/VertexBuffer.h @@ -24,25 +24,24 @@ namespace uirenderer { class VertexBuffer { public: - enum Mode { - kStandard = 0, - kOnePolyRingShadow = 1, - kTwoPolyRingShadow = 2, - kIndices = 3 + enum MeshFeatureFlags { + kNone = 0, + kAlpha = 1 << 0, + kIndices = 1 << 1, }; VertexBuffer() - : mBuffer(0) - , mIndices(0) + : mBuffer(nullptr) + , mIndices(nullptr) , mVertexCount(0) , mIndexCount(0) , mAllocatedVertexCount(0) , mAllocatedIndexCount(0) , mByteCount(0) - , mMode(kStandard) - , mReallocBuffer(0) - , mCleanupMethod(NULL) - , mCleanupIndexMethod(NULL) + , mMeshFeatureFlags(kNone) + , mReallocBuffer(nullptr) + , mCleanupMethod(nullptr) + , mCleanupIndexMethod(nullptr) {} ~VertexBuffer() { @@ -135,10 +134,12 @@ public: void updateVertexCount(unsigned int newCount) { mVertexCount = MathUtils::min(newCount, mAllocatedVertexCount); } - Mode getMode() const { return mMode; } + MeshFeatureFlags getMeshFeatureFlags() const { return mMeshFeatureFlags; } + void setMeshFeatureFlags(int flags) { + mMeshFeatureFlags = static_cast<MeshFeatureFlags>(flags); + } void setBounds(Rect bounds) { mBounds = bounds; } - void setMode(Mode mode) { mMode = mode; } template <class TYPE> void createDegenerateSeparators(int allocSize) { @@ -166,7 +167,7 @@ private: unsigned int mAllocatedIndexCount; unsigned int mByteCount; - Mode mMode; + MeshFeatureFlags mMeshFeatureFlags; void* mReallocBuffer; // used for multi-allocation |
