skia: GrGLAssembleGLInterface update load chromium extension functions
authorhendrikw <hendrikw@chromium.org>
Wed, 22 Jul 2015 16:30:08 +0000 (09:30 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 22 Jul 2015 16:30:08 +0000 (09:30 -0700)
Command buffer will expose GL_CHROMIUM_framebuffer_multisample and
GL_CHROMIUM_map_sub, added support for these to enable interface
validation to succeed.

Review URL: https://codereview.chromium.org/1248853003

src/gpu/gl/GrGLAssembleInterface.cpp

index 3f66c0388a5f73fd057072a92e2f2a4b57007ac1..d19b1a30779ecd9ff26b9e064bed88051e5ae1c1 100644 (file)
@@ -617,11 +617,21 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
     GET_PROC(FramebufferRenderbuffer);
     GET_PROC(FramebufferTexture2D);
 
-    if (version >= GR_GL_VER(3,0)) {
+    if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) {
+        GET_PROC_SUFFIX(RenderbufferStorageMultisample, CHROMIUM);
+        GET_PROC_SUFFIX(BlitFramebuffer, CHROMIUM);
+    } else if (version >= GR_GL_VER(3,0)) {
         GET_PROC(RenderbufferStorageMultisample);
         GET_PROC(BlitFramebuffer);
     }
 
+    if (extensions.has("GL_CHROMIUM_map_sub")) {
+        GET_PROC_SUFFIX(MapBufferSubData, CHROMIUM);
+        GET_PROC_SUFFIX(MapTexSubImage2D, CHROMIUM);
+        GET_PROC_SUFFIX(UnmapBufferSubData, CHROMIUM);
+        GET_PROC_SUFFIX(UnmapTexSubImage2D, CHROMIUM);
+    }
+
     if (extensions.has("GL_EXT_multisampled_render_to_texture")) {
         GET_PROC_SUFFIX(FramebufferTexture2DMultisample, EXT);
         functions->fRenderbufferStorageMultisampleES2EXT = (GrGLRenderbufferStorageMultisampleProc) get(ctx, "glRenderbufferStorageMultisampleEXT");