Use glInvalidateFramebuffer() when it is supported.
BUG=skia:1541
R=egdaniel@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/218763006
git-svn-id: http://skia.googlecode.com/svn/trunk@14026 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 21176d1..4cde2bd 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -75,7 +75,15 @@
/** GL_NV_shader_framebuffer_fetch */
kNV_FBFetchType,
- kLast_FBFetchType = kNV_FBFetchType,
+ kLast_FBFetchType = kNV_FBFetchType
+ };
+
+ enum InvalidateFBType {
+ kNone_InvalidateFBType,
+ kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
+ kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
+
+ kLast_InvalidateFBType = kInvalidate_InvalidateFBType
};
/**
@@ -159,6 +167,8 @@
FBFetchType fbFetchType() const { return fFBFetchType; }
+ InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
+
/**
* Returs a string containeng the caps info.
*/
@@ -307,9 +317,9 @@
int fMaxFragmentTextureUnits;
int fMaxFixedFunctionTextureCoords;
- MSFBOType fMSFBOType;
-
- FBFetchType fFBFetchType;
+ MSFBOType fMSFBOType;
+ FBFetchType fFBFetchType;
+ InvalidateFBType fInvalidateFBType;
bool fRGBA8RenderbufferSupport : 1;
bool fBGRAFormatSupport : 1;