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

Commit 098ed4c9 authored by Kevin Lubick's avatar Kevin Lubick
Browse files

Migrate to use SkSurfaces functions instead of deprecated methods

In https://skia-review.googlesource.com/c/skia/+/687642, Skia
moved some methods off SkSurface and into a gpu-specific
header to allow for better decoupling of (raster) SkSurfaces
and the GPU backend.

Change-Id: I6d72572c26e0e38fe686f6210a137f65afbba4a2
parent f4a76ae0
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)) {