Loading libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { sk_sp<const GrGLInterface> glInterface(GrGLCreateNativeInterface()); LOG_ALWAYS_FATAL_IF(!glInterface.get()); grContext.reset(GrContext::Create(GrBackend::kOpenGL_GrBackend, (GrBackendContext)glInterface.get())); grContext = GrContext::MakeGL(std::move(glInterface)); } else { grContext->resetContext(); } Loading libs/hwui/renderthread/CacheManager.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -53,13 +53,13 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display } } void CacheManager::reset(GrContext* context) { if (context != mGrContext.get()) { void CacheManager::reset(sk_sp<GrContext> context) { if (context != mGrContext) { destroy(); } if (context) { mGrContext = sk_ref_sp(context); mGrContext = std::move(context); mGrContext->getResourceCacheLimits(&mMaxResources, nullptr); updateContextCacheSizes(); } Loading libs/hwui/renderthread/CacheManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ private: CacheManager(const DisplayInfo& display); void reset(GrContext* grContext); void reset(sk_sp<GrContext> grContext); void destroy(); void updateContextCacheSizes(); Loading libs/hwui/renderthread/EglManager.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -141,8 +141,9 @@ void EglManager::initialize() { GrContextOptions options; options.fDisableDistanceFieldPaths = true; mRenderThread.cacheManager().configureContext(&options); mRenderThread.setGrContext(GrContext::Create(GrBackend::kOpenGL_GrBackend, (GrBackendContext)glInterface.get(), options)); sk_sp<GrContext> grContext(GrContext::MakeGL(std::move(glInterface), options)); LOG_ALWAYS_FATAL_IF(!grContext.get()); mRenderThread.setGrContext(grContext); } } Loading libs/hwui/renderthread/RenderThread.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -173,12 +173,12 @@ Readback& RenderThread::readback() { return *mReadback; } void RenderThread::setGrContext(GrContext* context) { void RenderThread::setGrContext(sk_sp<GrContext> context) { mCacheManager->reset(context); if (mGrContext.get()) { if (mGrContext) { mGrContext->releaseResourcesAndAbandonContext(); } mGrContext.reset(context); mGrContext = std::move(context); } int RenderThread::displayEventReceiverCallback(int fd, int events, void* data) { Loading Loading
libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -45,8 +45,7 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { sk_sp<const GrGLInterface> glInterface(GrGLCreateNativeInterface()); LOG_ALWAYS_FATAL_IF(!glInterface.get()); grContext.reset(GrContext::Create(GrBackend::kOpenGL_GrBackend, (GrBackendContext)glInterface.get())); grContext = GrContext::MakeGL(std::move(glInterface)); } else { grContext->resetContext(); } Loading
libs/hwui/renderthread/CacheManager.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -53,13 +53,13 @@ CacheManager::CacheManager(const DisplayInfo& display) : mMaxSurfaceArea(display } } void CacheManager::reset(GrContext* context) { if (context != mGrContext.get()) { void CacheManager::reset(sk_sp<GrContext> context) { if (context != mGrContext) { destroy(); } if (context) { mGrContext = sk_ref_sp(context); mGrContext = std::move(context); mGrContext->getResourceCacheLimits(&mMaxResources, nullptr); updateContextCacheSizes(); } Loading
libs/hwui/renderthread/CacheManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ private: CacheManager(const DisplayInfo& display); void reset(GrContext* grContext); void reset(sk_sp<GrContext> grContext); void destroy(); void updateContextCacheSizes(); Loading
libs/hwui/renderthread/EglManager.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -141,8 +141,9 @@ void EglManager::initialize() { GrContextOptions options; options.fDisableDistanceFieldPaths = true; mRenderThread.cacheManager().configureContext(&options); mRenderThread.setGrContext(GrContext::Create(GrBackend::kOpenGL_GrBackend, (GrBackendContext)glInterface.get(), options)); sk_sp<GrContext> grContext(GrContext::MakeGL(std::move(glInterface), options)); LOG_ALWAYS_FATAL_IF(!grContext.get()); mRenderThread.setGrContext(grContext); } } Loading
libs/hwui/renderthread/RenderThread.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -173,12 +173,12 @@ Readback& RenderThread::readback() { return *mReadback; } void RenderThread::setGrContext(GrContext* context) { void RenderThread::setGrContext(sk_sp<GrContext> context) { mCacheManager->reset(context); if (mGrContext.get()) { if (mGrContext) { mGrContext->releaseResourcesAndAbandonContext(); } mGrContext.reset(context); mGrContext = std::move(context); } int RenderThread::displayEventReceiverCallback(int fd, int events, void* data) { Loading