Create a GrGpu::createBackendTexture choke point
This also makes createBackendTexture take SkPixmaps (instead of a raw pixels pointer)
Change-Id: I5d8a5a58fa7b15862fbf46a3c232cb6ea7f58976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243158
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 908ba5d..1510fdf 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -129,11 +129,6 @@
GrStencilAttachment* createStencilAttachmentForRenderTarget(
const GrRenderTarget* rt, int width, int height, int numStencilSamples) override;
- GrBackendTexture createBackendTexture(int w, int h, const GrBackendFormat&,
- GrMipMapped, GrRenderable,
- const void* pixels, size_t rowBytes,
- const SkColor4f* color,
- GrProtected isProtected) override;
void deleteBackendTexture(const GrBackendTexture&) override;
bool precompileShader(const SkData& key, const SkData& data) override {
@@ -181,6 +176,11 @@
GrGLGpu(std::unique_ptr<GrGLContext>, GrContext*);
// GrGpu overrides
+ GrBackendTexture onCreateBackendTexture(int w, int h, const GrBackendFormat&,
+ GrMipMapped, GrRenderable,
+ const SkPixmap srcData[], int numMipLevels,
+ const SkColor4f* color, GrProtected) override;
+
void onResetContext(uint32_t resetBits) override;
void onResetTextureBindings() override;