aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-23 10:43:51 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-23 18:07:25 +0000
commit45e5068a6d10f4e4fd4658824310f8871f02ccf7 (patch)
tree6d6fa75f2539789b5c6021f628e5ad543681af09 /src/gpu/gl/GrGLCaps.cpp
parentccb46aaef838e1bd9d2feb249fb65aa935d7dc2c (diff)
Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation.
Bug: chromium:656320 Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1 Reviewed-on: https://skia-review.googlesource.com/17391 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index b9eee088e0..0d84a72121 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -54,6 +54,7 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fSRGBDecodeDisableSupport = false;
fSRGBDecodeDisableAffectsMipmaps = false;
fClearToBoundaryValuesIsBroken = false;
+ fClearTextureSupport = false;
fDrawArraysBaseVertexIsBroken = false;
fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
@@ -252,6 +253,14 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// vis-versa.
fRGBAToBGRAReadbackConversionsAreSlow = isMESA || isMAC;
+ if (kGL_GrGLStandard == standard) {
+ if (version >= GR_GL_VER(4,4) || ctxInfo.hasExtension("GL_ARB_clear_texture")) {
+ fClearTextureSupport = true;
+ }
+ } else if (ctxInfo.hasExtension("GL_EXT_clear_texture")) {
+ fClearTextureSupport = true;
+ }
+
/**************************************************************************
* GrShaderCaps fields
**************************************************************************/