diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-26 16:31:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-26 21:44:43 +0000 |
commit | a070ed7fccd8bc9c5f314e1a4ac090c497862836 (patch) | |
tree | ecc4a4e13087343c756472d77385f46b20149653 /src/gpu/GrContext.cpp | |
parent | 848271111d6982fc0666fb195da1d9d8d279746e (diff) |
Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets use GL FBO 0.
Bug: skia:7748
Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0
Reviewed-on: https://skia-review.googlesource.com/124048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index bade6e341c..7b0ab71676 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -172,11 +172,16 @@ SkSurfaceCharacterization GrContextThreadSafeProxy::createCharacterization( const SkImageInfo& ii, const GrBackendFormat& backendFormat, int sampleCnt, GrSurfaceOrigin origin, const SkSurfaceProps& surfaceProps, - bool isMipMapped) { + bool isMipMapped, bool willUseGLFBO0) { if (!backendFormat.isValid()) { return SkSurfaceCharacterization(); // return an invalid characterization } + if (kOpenGL_GrBackend != backendFormat.backend() && willUseGLFBO0) { + // The willUseGLFBO0 flags can only be used for a GL backend. + return SkSurfaceCharacterization(); // return an invalid characterization + } + if (!fCaps->mipMapSupport()) { isMipMapped = false; } @@ -211,6 +216,7 @@ SkSurfaceCharacterization GrContextThreadSafeProxy::createCharacterization( origin, config, FSAAType, sampleCnt, SkSurfaceCharacterization::Textureable(true), SkSurfaceCharacterization::MipMapped(isMipMapped), + SkSurfaceCharacterization::UsesGLFBO0(willUseGLFBO0), surfaceProps); } |