diff options
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.h')
| -rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.h b/libs/hwui/renderthread/DrawFrameTask.h index 5450dd5..a512408 100644 --- a/libs/hwui/renderthread/DrawFrameTask.h +++ b/libs/hwui/renderthread/DrawFrameTask.h @@ -18,6 +18,7 @@ #include <utils/Condition.h> #include <utils/Mutex.h> +#include <utils/StrongPointer.h> #include <utils/Vector.h> #include "RenderTask.h" @@ -36,11 +37,6 @@ namespace renderthread { class CanvasContext; class RenderThread; -struct SetDisplayListData { - RenderNode* targetNode; - DisplayListData* newData; -}; - /* * This is a special Super Task. It is re-used multiple times by RenderProxy, * and contains state (such as layer updaters & new DisplayListDatas) that is @@ -54,25 +50,28 @@ public: void setContext(CanvasContext* context); - void setDisplayListData(RenderNode* renderNode, DisplayListData* newData); void addLayer(DeferredLayerUpdater* layer); void removeLayer(DeferredLayerUpdater* layer); void setRenderNode(RenderNode* renderNode); void setDirty(int left, int top, int right, int bottom); void drawFrame(RenderThread* renderThread); + void flushStateChanges(RenderThread* renderThread); virtual void run(); private: - void syncFrameState(); + enum TaskMode { + MODE_INVALID, + MODE_FULL, + MODE_STATE_ONLY, + }; + + void postAndWait(RenderThread* renderThread, TaskMode mode); + bool syncFrameState(); void unblockUiThread(); static void drawRenderNode(CanvasContext* context, RenderNode* renderNode, Rect* dirty); - // This checks to see if there are any drawGlFunctors which would require - // a synchronous drawRenderNode() - static bool requiresSynchronousDraw(RenderNode* renderNode); - Mutex mLock; Condition mSignal; @@ -81,9 +80,9 @@ private: /********************************************* * Single frame data *********************************************/ - RenderNode* mRenderNode; + TaskMode mTaskMode; + sp<RenderNode> mRenderNode; Rect mDirty; - Vector<SetDisplayListData> mDisplayListDataUpdates; /********************************************* * Multi frame data |
