diff options
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.h')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h index 00c5bf0..d2ce1a6 100644 --- a/libs/hwui/renderthread/CanvasContext.h +++ b/libs/hwui/renderthread/CanvasContext.h @@ -23,6 +23,7 @@ #include <utils/Functor.h> #include <utils/Vector.h> +#include "../DamageAccumulator.h" #include "../DrawProfiler.h" #include "../RenderNode.h" #include "RenderTask.h" @@ -40,13 +41,13 @@ class Layer; namespace renderthread { -class GlobalContext; +class EglManager; // This per-renderer class manages the bridge between the global EGL context // and the render surface. class CanvasContext : public IFrameCallback { public: - CanvasContext(bool translucent, RenderNode* rootRenderNode); + CanvasContext(RenderThread& thread, bool translucent, RenderNode* rootRenderNode); virtual ~CanvasContext(); bool initialize(ANativeWindow* window); @@ -57,7 +58,7 @@ public: void makeCurrent(); void processLayerUpdate(DeferredLayerUpdater* layerUpdater, TreeInfo& info); void prepareTree(TreeInfo& info); - void draw(Rect* dirty); + void draw(); void destroyCanvasAndSurface(); // IFrameCallback, Chroreographer-driven frame callback entry point @@ -67,15 +68,15 @@ public: void flushCaches(Caches::FlushMode flushMode); - void invokeFunctor(Functor* functor); + static void invokeFunctor(RenderThread& thread, Functor* functor); void runWithGlContext(RenderTask* task); Layer* createRenderLayer(int width, int height); Layer* createTextureLayer(); - ANDROID_API static void setTextureAtlas(const sp<GraphicBuffer>& buffer, - int64_t* map, size_t mapSize); + ANDROID_API static void setTextureAtlas(RenderThread& thread, + const sp<GraphicBuffer>& buffer, int64_t* map, size_t mapSize); void notifyFramePending(); @@ -90,8 +91,8 @@ private: void requireGlContext(); - GlobalContext* mGlobalContext; RenderThread& mRenderThread; + EglManager& mEglManager; sp<ANativeWindow> mNativeWindow; EGLSurface mEglSurface; bool mDirtyRegionsEnabled; @@ -99,6 +100,7 @@ private: bool mOpaque; OpenGLRenderer* mCanvas; bool mHaveNewSurface; + DamageAccumulator mDamageAccumulator; const sp<RenderNode> mRootRenderNode; |