From 6c15ffa196fc9b7724c189d833c3435d8db12266 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 2 Feb 2015 13:50:55 -0800 Subject: Refactoring of Program ownership/lifecycle, and WIP Glop rendering path Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c --- libs/hwui/Caches.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'libs/hwui/Caches.h') diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h index f6d3476..16e2058 100644 --- a/libs/hwui/Caches.h +++ b/libs/hwui/Caches.h @@ -162,8 +162,6 @@ public: void registerFunctors(uint32_t functorCount); void unregisterFunctors(uint32_t functorCount); - Program* currentProgram; - bool drawDeferDisabled; bool drawReorderDisabled; @@ -219,6 +217,10 @@ public: int propertyAmbientShadowStrength; int propertySpotShadowStrength; + void setProgram(const ProgramDescription& description); + void setProgram(Program* program); + + Program& program() { return *mProgram; } PixelBufferState& pixelBufferState() { return *mPixelBufferState; } TextureState& textureState() { return *mTextureState; } @@ -246,10 +248,6 @@ private: } RenderState* mRenderState; - - PixelBufferState* mPixelBufferState = nullptr; // TODO: move to RenderState - TextureState* mTextureState = nullptr; // TODO: move to RenderState - Extensions& mExtensions; // Used to render layers @@ -264,6 +262,12 @@ private: uint32_t mFunctorsCount; OverdrawColorSet mOverdrawDebugColorSet; + + // TODO: move below to RenderState + PixelBufferState* mPixelBufferState = nullptr; + TextureState* mTextureState = nullptr; + Program* mProgram = nullptr; // note: object owned by ProgramCache + }; // class Caches }; // namespace uirenderer -- cgit v1.1