Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: src/gpu/gl/GrGLInterface.cpp

Issue 217503003: Add GL_ARB_invalidate_subdata functions to GrGLInterface. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix compilation issues Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLInterface.cpp
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index f40821f3dafc31225936df1fed3a797de252a6b3..c5ab39ac7b55d1c6b6951d172f883aeb57287a64 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -486,5 +486,25 @@ bool GrGLInterface::validate() const {
RETURN_FALSE_INTERFACE
}
}
+
+#if 0 // This can be enabled once Chromium is updated to set these functions pointers.
+ if ((kGL_GrGLStandard == fStandard) || fExtensions.has("GL_ARB_invalidate_subdata")) {
+ if (NULL == fFunctions.fInvalidateBufferData ||
+ NULL == fFunctions.fInvalidateBufferSubData ||
+ NULL == fFunctions.fInvalidateFramebuffer ||
+ NULL == fFunctions.fInvalidateSubFramebuffer ||
+ NULL == fFunctions.fInvalidateTexImage ||
+ NULL == fFunctions.fInvalidateTexSubImage) {
+ RETURN_FALSE_INTERFACE;
+ }
+ } else if (glVer >= GR_GL_VER(3,0)) {
+ // ES 3.0 adds the framebuffer functions but not the others.
+ if (NULL == fFunctions.fInvalidateFramebuffer ||
+ NULL == fFunctions.fInvalidateSubFramebuffer) {
+ RETURN_FALSE_INTERFACE;
+ }
+ }
+#endif
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698