aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-29 08:26:54 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-29 17:36:31 +0000
commitb0e93a22bbfad05bb834e33387880ece56e0f6d2 (patch)
tree41862bc027841d9d03a06661f2f3ef820610a9ac /src/gpu/mtl/GrMtlGpu.h
parentaa0ce825b877871f73532beb6fde6bf2f80e99dd (diff)
Remove origin field from GrSurface (take 2)
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. TBR=bsalomon@google.com Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74 Reviewed-on: https://skia-review.googlesource.com/30280 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@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 f8e3e5be0a..17949488cc 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -31,20 +31,22 @@ public:
id<MTLDevice> device() const { return fDevice; }
- bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes,
+ bool onGetReadPixelsInfo(GrSurface* srcSurface, GrSurfaceOrigin origin,
+ 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 {}
GrGpuRTCommandBuffer* createCommandBuffer(
@@ -82,26 +84,21 @@ private:
sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
const GrMipLevel texels[], int mipLevelCount) override;
- 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;
}
@@ -112,7 +109,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,
@@ -120,7 +117,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 {
@@ -134,7 +131,7 @@ private:
return false;
}
- void onResolveRenderTarget(GrRenderTarget* target) override { return; }
+ void onResolveRenderTarget(GrRenderTarget* target, GrSurfaceOrigin) override { return; }
void onFinishFlush(bool insertedSemaphores) override {}