aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl/GrMtlGpu.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-01 13:51:44 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-01 13:51:54 +0000
commit7294b851d277d8e703b23657e1a990f1ae24ead6 (patch)
treeb042db82a0b5bf61d0f453d404dbdeab2f8e3a47 /src/gpu/mtl/GrMtlGpu.h
parentac32662d128484eae3230653e3794a6f33dd9f5b (diff)
Revert "Remove origin field from GrSurface"
This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > 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> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@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, 15 insertions, 12 deletions
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index c590f30dec..53c214943f 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -29,22 +29,20 @@ public:
const GrMtlCaps& mtlCaps() const { return *fMtlCaps.get(); }
- bool onGetReadPixelsInfo(GrSurface* srcSurface, GrSurfaceOrigin srcOrigin,
- int readWidth, int readHeight, size_t rowBytes,
+ bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeight, size_t rowBytes,
GrPixelConfig readConfig, DrawPreference*,
ReadPixelTempDrawInfo*) override { return false; }
- bool onGetWritePixelsInfo(GrSurface* dstSurface, GrSurfaceOrigin dstOrigin,
- int width, int height,
+ bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
GrPixelConfig srcConfig, DrawPreference*,
WritePixelTempDrawInfo*) override { return false; }
- bool onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin,
- GrSurface* src, GrSurfaceOrigin srcOrigin,
+ bool onCopySurface(GrSurface* dst,
+ GrSurface* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) override { return false; }
- void onQueryMultisampleSpecs(GrRenderTarget*, GrSurfaceOrigin, const GrStencilSettings&,
+ void onQueryMultisampleSpecs(GrRenderTarget* rt, const GrStencilSettings&,
int* effectiveSampleCnt, SamplePattern*) override {}
GrGpuCommandBuffer* createCommandBuffer(const GrGpuCommandBuffer::LoadAndStoreInfo&,
@@ -78,21 +76,26 @@ private:
return nullptr;
}
- sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&, GrWrapOwnership) override {
+ sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&,
+ GrSurfaceOrigin,
+ GrWrapOwnership) override {
return nullptr;
}
sk_sp<GrTexture> onWrapRenderableBackendTexture(const GrBackendTexture&,
+ GrSurfaceOrigin,
int sampleCnt,
GrWrapOwnership) override {
return nullptr;
}
- sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTarget&) override {
+ sk_sp<GrRenderTarget> onWrapBackendRenderTarget(const GrBackendRenderTarget&,
+ GrSurfaceOrigin) override {
return nullptr;
}
sk_sp<GrRenderTarget> onWrapBackendTextureAsRenderTarget(const GrBackendTexture&,
+ GrSurfaceOrigin,
int sampleCnt) override {
return nullptr;
}
@@ -103,7 +106,7 @@ private:
gr_instanced::InstancedRendering* onCreateInstancedRendering() override { return nullptr; }
- bool onReadPixels(GrSurface* surface, GrSurfaceOrigin,
+ bool onReadPixels(GrSurface* surface,
int left, int top, int width, int height,
GrPixelConfig,
void* buffer,
@@ -111,7 +114,7 @@ private:
return false;
}
- bool onWritePixels(GrSurface* surface, GrSurfaceOrigin,
+ bool onWritePixels(GrSurface* surface,
int left, int top, int width, int height,
GrPixelConfig config,
const GrMipLevel texels[], int mipLevelCount) override {
@@ -125,7 +128,7 @@ private:
return false;
}
- void onResolveRenderTarget(GrRenderTarget* target, GrSurfaceOrigin) override { return; }
+ void onResolveRenderTarget(GrRenderTarget* target) override { return; }
GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
int width,