aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-28 11:56:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 16:02:42 +0000
commitdf0e09feacb29290fe94d37f921731b18f2edae0 (patch)
tree8059c31deb493e101b616578f6db0d4bc4d05438 /src/gpu/mtl/GrMtlGpu.h
parentf57c0d67611186ba74179b53b421e64b63a579c7 (diff)
Remove origin field from GrSurface
This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/mtl/GrMtlGpu.h')
-rw-r--r--src/gpu/mtl/GrMtlGpu.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index 53c214943f..c590f30dec 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -29,20 +29,22 @@ public:
const GrMtlCaps& mtlCaps() const { return *fMtlCaps.get(); }
- bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes,
+ bool onGetReadPixelsInfo(GrSurface* srcSurface, GrSurfaceOrigin srcOrigin,
+ int readWidth, int readHeight, size_t rowBytes,
GrPixelConfig readConfig, DrawPreference*,
ReadPixelTempDrawInfo*) override { return false; }
- bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
+ bool onGetWritePixelsInfo(GrSurface* dstSurface, GrSurfaceOrigin dstOrigin,
+ int width, int height,
GrPixelConfig srcConfig, DrawPreference*,
WritePixelTempDrawInfo*) override { return false; }
- bool onCopySurface(GrSurface* dst,
- GrSurface* src,
+ bool onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin,
+ GrSurface* src, GrSurfaceOrigin srcOrigin,
const SkIRect& srcRect,
const SkIPoint& dstPoint) override { return false; }
- void onQueryMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&,
+ void onQueryMultisampleSpecs(GrRenderTarget*, GrSurfaceOrigin, const GrStencilSettings&,
int* effectiveSampleCnt, SamplePattern*) override {}
GrGpuCommandBuffer* createCommandBuffer(const GrGpuCommandBuffer::LoadAndStoreInfo&,
@@ -76,26 +78,21 @@ private:
return nullptr;
}
- sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&,
- GrSurfaceOrigin,
- GrWrapOwnership) override {
+ sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&, GrWrapOwnership) override {
return nullptr;
}
sk_sp<GrTexture> onWrapRenderableBackendTexture(const GrBackendTexture&,
- GrSurfaceOrigin,
int sampleCnt,
GrWrapOwnership) override {
return nullptr;
}
- sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTarget&,
- GrSurfaceOrigin) override {
+ sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTarget&) override {
return nullptr;
}
sk_sp<GrRenderTarget> onWrapBackendTextureAsRenderTarget(const GrBackendTexture&,
- GrSurfaceOrigin,
int sampleCnt) override {
return nullptr;
}
@@ -106,7 +103,7 @@ private:
gr_instanced::InstancedRendering* onCreateInstancedRendering() override { return nullptr; }
- bool onReadPixels(GrSurface* surface,
+ bool onReadPixels(GrSurface* surface, GrSurfaceOrigin,
int left, int top, int width, int height,
GrPixelConfig,
void* buffer,
@@ -114,7 +111,7 @@ private:
return false;
}
- bool onWritePixels(GrSurface* surface,
+ bool onWritePixels(GrSurface* surface, GrSurfaceOrigin,
int left, int top, int width, int height,
GrPixelConfig config,
const GrMipLevel texels[], int mipLevelCount) override {
@@ -128,7 +125,7 @@ private:
return false;
}
- void onResolveRenderTarget(GrRenderTarget* target) override { return; }
+ void onResolveRenderTarget(GrRenderTarget* target, GrSurfaceOrigin) override { return; }
GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
int width,