Implement canCopySurface for GrMock and GrMtl.
Bug: skia: Change-Id: I60730bacb03b43e872c68fd7eb8e845ac0910f67 Reviewed-on: https://skia-review.googlesource.com/125730 Commit-Queue: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
3288d63918
commit
ba2c826038
@ -236,10 +236,8 @@ public:
|
||||
/**
|
||||
* Returns whether or not we will be able to do a copy given the passed in params
|
||||
*/
|
||||
virtual bool canCopySurface(const GrSurfaceProxy* /*dst*/, const GrSurfaceProxy* /*src*/,
|
||||
const SkIRect& /*srcRect*/, const SkIPoint& /*dstPoint*/) const {
|
||||
return true;
|
||||
}
|
||||
virtual bool canCopySurface(const GrSurfaceProxy* dst, const GrSurfaceProxy* src,
|
||||
const SkIRect& srcRect, const SkIPoint& dstPoint) const = 0;
|
||||
|
||||
/**
|
||||
* This is can be called before allocating a texture to be a dst for copySurface. This is only
|
||||
|
@ -70,6 +70,11 @@ public:
|
||||
bool surfaceSupportsWritePixels(const GrSurface*) const override { return true; }
|
||||
bool surfaceSupportsReadPixels(const GrSurface*) const override { return true; }
|
||||
|
||||
bool canCopySurface(const GrSurfaceProxy* dst, const GrSurfaceProxy* src,
|
||||
const SkIRect& srcRect, const SkIPoint& dstPoint) const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, GrSurfaceOrigin*,
|
||||
bool* rectsMustMatch, bool* disallowSubrect) const override {
|
||||
return false;
|
||||
|
@ -46,6 +46,11 @@ public:
|
||||
return fPreferedStencilFormat;
|
||||
}
|
||||
#endif
|
||||
bool canCopySurface(const GrSurfaceProxy* dst, const GrSurfaceProxy* src,
|
||||
const SkIRect& srcRect, const SkIPoint& dstPoint) const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, GrSurfaceOrigin*,
|
||||
bool* rectsMustMatch, bool* disallowSubrect) const override {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user