Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d9bc359 authored by Kevin Lubick's avatar Kevin Lubick Committed by Android (Google) Code Review
Browse files

Merge "Migrate to use SkSurfaces functions instead of deprecated methods"

parents 5d5fa3e6 098ed4c9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "SkClipStack.h"
#include "SkRect.h"
#include "SkM44.h"
#include <include/gpu/ganesh/SkSurfaceGanesh.h>
#include "include/gpu/GpuTypes.h" // from Skia
#include "utils/GLUtils.h"
#include <effects/GainmapRenderer.h>
@@ -98,7 +99,8 @@ void GLFunctorDrawable::onDraw(SkCanvas* canvas) {
        tmpSurface->getCanvas()->clear(SK_ColorTRANSPARENT);

        GrGLFramebufferInfo fboInfo;
        if (!tmpSurface->getBackendRenderTarget(SkSurface::kFlushWrite_BackendHandleAccess)
        if (!SkSurfaces::GetBackendRenderTarget(tmpSurface.get(),
                                                SkSurfaces::BackendHandleAccess::kFlushWrite)
                     .getGLFramebufferInfo(&fboInfo)) {
            ALOGW("Unable to extract renderTarget info from offscreen canvas; aborting GLFunctor");
            return;
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <GrBackendSurface.h>
#include <GrDirectContext.h>
#include <GrTypes.h>
#include <include/gpu/ganesh/SkSurfaceGanesh.h>
#include <android/sync.h>
#include <ui/FatVector.h>
#include <vk/GrVkExtensions.h>
@@ -593,7 +594,8 @@ nsecs_t VulkanManager::finishFrame(SkSurface* surface) {
                // retrieve VkImage used as render target
                VkImage image = VK_NULL_HANDLE;
                GrBackendRenderTarget backendRenderTarget =
                        surface->getBackendRenderTarget(SkSurface::kFlushRead_BackendHandleAccess);
                        SkSurfaces::GetBackendRenderTarget(
                            surface, SkSurfaces::BackendHandleAccess::kFlushRead);
                if (backendRenderTarget.isValid()) {
                    GrVkImageInfo info;
                    if (backendRenderTarget.getVkImageInfo(&info)) {