diff options
author | Adlai Holler <adlai@google.com> | 2020-07-27 11:42:45 -0400 |
---|---|---|
committer | Adlai Holler <adlai@google.com> | 2020-07-28 09:18:33 -0400 |
commit | f8c434eb7a374f8a9df408c143d364683c6f40af (patch) | |
tree | a8fa4edbb00a2fa48706e815c87440b07248f0a2 /libs/hwui/renderthread/RenderThread.h | |
parent | b2991250aad9b7b9c0a5e038f5458d94e56c5d48 (diff) |
Migrate from GrContext to GrDirectContext
This is part of an effort to distinguish between different types of
contexts in GPU Skia. When using a DeferredDisplayList (DDL)
recorder, the context you get is not a direct context and cannot
be used for operations like uploading or reading textures.
Since Android does not use DDLs, it is not directly affected by this
change but other APIs, such as SkImage::MakeFromTexture are
being migrated to require a GrDirectContext to increase sanity.
Change-Id: I9afbdf3c026a9f9cb6ad2aad904915e189e584d6
Diffstat (limited to 'libs/hwui/renderthread/RenderThread.h')
-rw-r--r-- | libs/hwui/renderthread/RenderThread.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h index 2c295bcd8105..b8ce55650516 100644 --- a/libs/hwui/renderthread/RenderThread.h +++ b/libs/hwui/renderthread/RenderThread.h @@ -17,7 +17,7 @@ #ifndef RENDERTHREAD_H_ #define RENDERTHREAD_H_ -#include <GrContext.h> +#include <GrDirectContext.h> #include <SkBitmap.h> #include <apex/choreographer.h> #include <cutils/compiler.h> @@ -106,8 +106,8 @@ public: ProfileDataContainer& globalProfileData() { return mGlobalProfileData; } Readback& readback(); - GrContext* getGrContext() const { return mGrContext.get(); } - void setGrContext(sk_sp<GrContext> cxt); + GrDirectContext* getGrContext() const { return mGrContext.get(); } + void setGrContext(sk_sp<GrDirectContext> cxt); CacheManager& cacheManager() { return *mCacheManager; } VulkanManager& vulkanManager() { return *mVkManager; } @@ -186,7 +186,7 @@ private: ProfileDataContainer mGlobalProfileData; Readback* mReadback = nullptr; - sk_sp<GrContext> mGrContext; + sk_sp<GrDirectContext> mGrContext; CacheManager* mCacheManager; VulkanManager* mVkManager; }; |