diff options
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h index 076e3d43a2c9..9bc5985e5b16 100644 --- a/libs/hwui/renderthread/RenderThread.h +++ b/libs/hwui/renderthread/RenderThread.h @@ -22,6 +22,7 @@ #include "../JankTracker.h" #include "TimeLord.h" +#include <GrContext.h> #include <cutils/compiler.h> #include <ui/DisplayInfo.h> #include <utils/Looper.h> @@ -36,6 +37,7 @@ class DisplayEventReceiver; namespace uirenderer { +class Readback; class RenderState; class TestUtils; @@ -45,6 +47,7 @@ class CanvasContext; class DispatchFrameCallbacks; class EglManager; class RenderProxy; +class VulkanManager; class TaskQueue { public: @@ -71,6 +74,7 @@ protected: }; class ANDROID_API RenderThread : public Thread { + PREVENT_COPY_AND_ASSIGN(RenderThread); public: // RenderThread takes complete ownership of tasks that are queued // and will delete them after they are run @@ -88,12 +92,18 @@ public: void pushBackFrameCallback(IFrameCallback* callback); TimeLord& timeLord() { return mTimeLord; } - RenderState& renderState() { return *mRenderState; } - EglManager& eglManager() { return *mEglManager; } + RenderState& renderState() const { return *mRenderState; } + EglManager& eglManager() const { return *mEglManager; } JankTracker& jankTracker() { return *mJankTracker; } + Readback& readback(); const DisplayInfo& mainDisplayInfo() { return mDisplayInfo; } + GrContext* getGrContext() const { return mGrContext.get(); } + void setGrContext(GrContext* cxt) { mGrContext.reset(cxt); } + + VulkanManager& vulkanManager() { return *mVkManager; } + protected: virtual bool threadLoop() override; @@ -144,6 +154,10 @@ private: EglManager* mEglManager; JankTracker* mJankTracker = nullptr; + Readback* mReadback = nullptr; + + sk_sp<GrContext> mGrContext; + VulkanManager* mVkManager; }; } /* namespace renderthread */ |