implemented copy surface as blit for metal gpu backend
Bug: skia:
Change-Id: Ic59fe585c02168a361985f0864242b3c11e9d98e
Reviewed-on: https://skia-review.googlesource.com/142684
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
diff --git a/src/gpu/mtl/GrMtlCaps.h b/src/gpu/mtl/GrMtlCaps.h
index 1ff16ad..5d6c82b 100644
--- a/src/gpu/mtl/GrMtlCaps.h
+++ b/src/gpu/mtl/GrMtlCaps.h
@@ -46,10 +46,13 @@
return fPreferedStencilFormat;
}
#endif
+ bool canCopyAsBlit(GrPixelConfig dstConfig, int dstSampleCount, GrSurfaceOrigin dstOrigin,
+ GrPixelConfig srcConfig, int srcSampleCount, GrSurfaceOrigin srcOrigin,
+ const SkIRect& srcRect, const SkIPoint& dstPoint,
+ bool areDstSrcSameObj) const;
+
bool canCopySurface(const GrSurfaceProxy* dst, const GrSurfaceProxy* src,
- const SkIRect& srcRect, const SkIPoint& dstPoint) const override {
- return false;
- }
+ const SkIRect& srcRect, const SkIPoint& dstPoint) const override;
bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, GrSurfaceOrigin*,
bool* rectsMustMatch, bool* disallowSubrect) const override {