diff options
author | 2017-09-29 15:58:22 -0400 | |
---|---|---|
committer | 2017-09-29 20:19:14 +0000 | |
commit | bb76ace72bee5d44189b6ee6c81cda174ce9ea30 (patch) | |
tree | 679a7724b6b8361fd0e29293cb362d3db10cb9ff /src/gpu/gl/GrGLCaps.h | |
parent | 4b85b6dd5a7296f4543b226a534c76ef6f438e55 (diff) |
Fall back to non mipped Texture when we can't copy base to mipped texture
TBR: bsalomon@google.com
Bug: skia:7094
Change-Id: I9d2ba78c4d4332a22e2357cde0598de51299067d
Reviewed-on: https://skia-review.googlesource.com/53541
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLCaps.h')
-rw-r--r-- | src/gpu/gl/GrGLCaps.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index 1ce6094a6b..68cbc9bf16 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -125,6 +125,15 @@ public: return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderable_Flag); } } + + bool isConfigCopyable(GrPixelConfig config) const override { + // In GL we have three ways to be able to copy. CopyTexImage, blit, and draw. CopyTexImage + // requires the src to be an FBO attachment, blit requires both src and dst to be FBO + // attachments, and draw requires the dst to be an FBO attachment. Thus to copy from and to + // the same config, we need that config to be renderable so we can attach it to an FBO. + return this->isConfigRenderable(config, false); + } + bool canConfigBeImageStorage(GrPixelConfig config) const override { return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseAsImageStorage_Flag); } |