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

Commit 625c94af authored by Kevin Lubick's avatar Kevin Lubick
Browse files

Replace direct SkSurface creation with canvas->makeSurface

This is causing Skia to need to define GPU-specific canvas
methods even when Android is being built without a GPU backend.

Change-Id: Ia2be81e15599d3c6984748edde8d7ec97be9eb7a
parent bc120bd8
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -675,12 +675,11 @@ public:
            // because the webview functor still doesn't respect the canvas clip stack.
            const SkIRect deviceBounds = c->getDeviceClipBounds();
            if (mLayerSurface == nullptr || c->imageInfo() != mLayerImageInfo) {
                GrRecordingContext* directContext = c->recordingContext();
                mLayerImageInfo =
                        c->imageInfo().makeWH(deviceBounds.width(), deviceBounds.height());
                mLayerSurface = SkSurface::MakeRenderTarget(directContext, skgpu::Budgeted::kYes,
                                                            mLayerImageInfo, 0,
                                                            kTopLeft_GrSurfaceOrigin, nullptr);
                // SkCanvas::makeSurface returns a new surface that will be GPU-backed if
                // canvas was also.
                mLayerSurface = c->makeSurface(mLayerImageInfo);
            }

            SkCanvas* layerCanvas = mLayerSurface->getCanvas();