diff options
author | Greg Daniel <egdaniel@google.com> | 2018-03-16 16:13:10 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-16 20:54:26 +0000 |
commit | 55fa647596be0952464820b46724ce4f358de7f7 (patch) | |
tree | 16d38e728a5ad9512383a231601cc3ed31276dc6 /src/gpu/gl | |
parent | 041e7ced7c39710ad48e78f19aa769fa4f0e33fa (diff) |
Correctly discard or load RT when doing copies as draws in Vulkan
This fixes all the copy as draw issues we've had with certain devices and
the cap is no longer needed.
Bug: skia:
Change-Id: Id0b750849c4c920beae2d8cb3eda5f402018f194
Reviewed-on: https://skia-review.googlesource.com/114860
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 4e88f7dde2..4e1e64b21e 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3449,7 +3449,8 @@ void GrGLGpu::unbindTextureFBOForPixelOps(GrGLenum fboTarget, GrSurface* surface bool GrGLGpu::onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin, GrSurface* src, GrSurfaceOrigin srcOrigin, - const SkIRect& srcRect, const SkIPoint& dstPoint) { + const SkIRect& srcRect, const SkIPoint& dstPoint, + bool canDiscardOutsideDstRect) { // None of our copy methods can handle a swizzle. TODO: Make copySurfaceAsDraw handle the // swizzle. if (this->caps()->shaderCaps()->configOutputSwizzle(src->config()) != diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index 7ddd4e752d..c09cac64fc 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -256,7 +256,8 @@ private: bool onCopySurface(GrSurface* dst, GrSurfaceOrigin dstOrigin, GrSurface* src, GrSurfaceOrigin srcOrigin, - const SkIRect& srcRect, const SkIPoint& dstPoint) override; + const SkIRect& srcRect, const SkIPoint& dstPoint, + bool canDiscardOutsideDstRect) override; // binds texture unit in GL void setTextureUnit(int unitIdx); |