diff options
author | 2020-10-07 14:16:40 -0400 | |
---|---|---|
committer | 2020-10-07 22:20:44 +0000 | |
commit | d2345212d8f5cbe9193ca26ccce138342dca2fa6 (patch) | |
tree | 7f12e1a01c17cee5f95ecfa30e876cdfb99eddf2 | |
parent | 53d614ccf1d09350c93708a808dcdcada5a88e40 (diff) |
Migrate some last instances of GrContext to GrDirectContext
This is a rename with no functional changes.
Change-Id: I4b0b7ee1926b688029e257b35c469113c0404a5b
-rw-r--r-- | libs/hwui/pipeline/skia/ShaderCache.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/pipeline/skia/ShaderCache.h | 2 | ||||
-rw-r--r-- | libs/hwui/renderthread/CacheManager.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/renderthread/CacheManager.h | 6 | ||||
-rw-r--r-- | libs/hwui/renderthread/IRenderPipeline.h | 2 | ||||
-rw-r--r-- | libs/hwui/renderthread/VulkanSurface.cpp | 5 | ||||
-rw-r--r-- | libs/hwui/renderthread/VulkanSurface.h | 6 |
7 files changed, 14 insertions, 13 deletions
diff --git a/libs/hwui/pipeline/skia/ShaderCache.cpp b/libs/hwui/pipeline/skia/ShaderCache.cpp index 66aa8c203799..3baff7ea8f90 100644 --- a/libs/hwui/pipeline/skia/ShaderCache.cpp +++ b/libs/hwui/pipeline/skia/ShaderCache.cpp @@ -15,7 +15,7 @@ */ #include "ShaderCache.h" -#include <GrContext.h> +#include <GrDirectContext.h> #include <log/log.h> #include <openssl/sha.h> #include <algorithm> @@ -206,7 +206,7 @@ void ShaderCache::store(const SkData& key, const SkData& data) { } } -void ShaderCache::onVkFrameFlushed(GrContext* context) { +void ShaderCache::onVkFrameFlushed(GrDirectContext* context) { { std::lock_guard<std::mutex> lock(mMutex); diff --git a/libs/hwui/pipeline/skia/ShaderCache.h b/libs/hwui/pipeline/skia/ShaderCache.h index 5b8e668a56f4..4dcc9fb49802 100644 --- a/libs/hwui/pipeline/skia/ShaderCache.h +++ b/libs/hwui/pipeline/skia/ShaderCache.h @@ -80,7 +80,7 @@ public: * Pipeline cache is saved on disk only if the size of the data has changed or there was * a new shader compiled. */ - void onVkFrameFlushed(GrContext* context); + void onVkFrameFlushed(GrDirectContext* context); private: // Creation and (the lack of) destruction is handled internally. diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp index b57dee4897ac..85924c5e8939 100644 --- a/libs/hwui/renderthread/CacheManager.cpp +++ b/libs/hwui/renderthread/CacheManager.cpp @@ -61,7 +61,7 @@ CacheManager::CacheManager() SkGraphics::SetFontCacheLimit(mMaxCpuFontCacheBytes); } -void CacheManager::reset(sk_sp<GrContext> context) { +void CacheManager::reset(sk_sp<GrDirectContext> context) { if (context != mGrContext) { destroy(); } diff --git a/libs/hwui/renderthread/CacheManager.h b/libs/hwui/renderthread/CacheManager.h index b009cc4f48f2..0a6b8dc26cc3 100644 --- a/libs/hwui/renderthread/CacheManager.h +++ b/libs/hwui/renderthread/CacheManager.h @@ -18,7 +18,7 @@ #define CACHEMANAGER_H #ifdef __ANDROID__ // Layoutlib does not support hardware acceleration -#include <GrContext.h> +#include <GrDirectContext.h> #endif #include <SkSurface.h> #include <utils/String8.h> @@ -58,13 +58,13 @@ private: explicit CacheManager(); #ifdef __ANDROID__ // Layoutlib does not support hardware acceleration - void reset(sk_sp<GrContext> grContext); + void reset(sk_sp<GrDirectContext> grContext); #endif void destroy(); const size_t mMaxSurfaceArea; #ifdef __ANDROID__ // Layoutlib does not support hardware acceleration - sk_sp<GrContext> mGrContext; + sk_sp<GrDirectContext> mGrContext; #endif const size_t mMaxResourceBytes; diff --git a/libs/hwui/renderthread/IRenderPipeline.h b/libs/hwui/renderthread/IRenderPipeline.h index a04738d6a6f0..aceb5a528fc8 100644 --- a/libs/hwui/renderthread/IRenderPipeline.h +++ b/libs/hwui/renderthread/IRenderPipeline.h @@ -27,7 +27,7 @@ #include <SkRect.h> #include <utils/RefBase.h> -class GrContext; +class GrDirectContext; struct ANativeWindow; diff --git a/libs/hwui/renderthread/VulkanSurface.cpp b/libs/hwui/renderthread/VulkanSurface.cpp index 1da09b454da7..acf4931d6144 100644 --- a/libs/hwui/renderthread/VulkanSurface.cpp +++ b/libs/hwui/renderthread/VulkanSurface.cpp @@ -16,6 +16,7 @@ #include "VulkanSurface.h" +#include <GrDirectContext.h> #include <SkSurface.h> #include <algorithm> @@ -117,7 +118,7 @@ static bool ConnectAndSetWindowDefaults(ANativeWindow* window) { VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, - GrContext* grContext, const VulkanManager& vkManager, + GrDirectContext* grContext, const VulkanManager& vkManager, uint32_t extraBuffers) { // Connect and set native window to default configurations. if (!ConnectAndSetWindowDefaults(window)) { @@ -310,7 +311,7 @@ bool VulkanSurface::UpdateWindow(ANativeWindow* window, const WindowInfo& window } VulkanSurface::VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, - GrContext* grContext) + GrDirectContext* grContext) : mNativeWindow(window), mWindowInfo(windowInfo), mGrContext(grContext) {} VulkanSurface::~VulkanSurface() { diff --git a/libs/hwui/renderthread/VulkanSurface.h b/libs/hwui/renderthread/VulkanSurface.h index 40a44b11c0bc..409921bdfdd7 100644 --- a/libs/hwui/renderthread/VulkanSurface.h +++ b/libs/hwui/renderthread/VulkanSurface.h @@ -35,7 +35,7 @@ class VulkanManager; class VulkanSurface { public: static VulkanSurface* Create(ANativeWindow* window, ColorMode colorMode, SkColorType colorType, - sk_sp<SkColorSpace> colorSpace, GrContext* grContext, + sk_sp<SkColorSpace> colorSpace, GrDirectContext* grContext, const VulkanManager& vkManager, uint32_t extraBuffers); ~VulkanSurface(); @@ -101,7 +101,7 @@ private: SkMatrix preTransform; }; - VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, GrContext* grContext); + VulkanSurface(ANativeWindow* window, const WindowInfo& windowInfo, GrDirectContext* grContext); static bool InitializeWindowInfoStruct(ANativeWindow* window, ColorMode colorMode, SkColorType colorType, sk_sp<SkColorSpace> colorSpace, const VulkanManager& vkManager, uint32_t extraBuffers, @@ -119,7 +119,7 @@ private: sp<ANativeWindow> mNativeWindow; WindowInfo mWindowInfo; - GrContext* mGrContext; + GrDirectContext* mGrContext; uint32_t mPresentCount = 0; NativeBufferInfo* mCurrentBufferInfo = nullptr; |