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

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 174123003: Add hooks for GL_EXT_debug_marker in gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "gl/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLExtensions.h" 10 #include "gl/GrGLExtensions.h"
11 #include "gl/GrGLUtil.h" 11 #include "gl/GrGLUtil.h"
12 12
13 #include <stdio.h> 13 #include <stdio.h>
14 14
15 #if GR_GL_PER_GL_FUNC_CALLBACK 15 #if GR_GL_PER_GL_FUNC_CALLBACK
16 namespace { 16 namespace {
17 void GrGLDefaultInterfaceCallback(const GrGLInterface*) {} 17 void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
18 } 18 }
19 #endif 19 #endif
20 20
21 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface* interf ace,
22 GrGLInsertEventMarkerProc i nsertEventMarkerFn,
23 GrGLPushGroupMarkerProc pus hGroupMarkerFn,
24 GrGLPopGroupMarkerProc popG roupMarkerFn) {
25 GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
26
27 if (!newInterface->fExtensions.has("GL_EXT_debug_marker")) {
28 newInterface->fExtensions.add("GL_EXT_debug_marker");
29 }
30
31 newInterface->fInsertEventMarker = insertEventMarkerFn;
32 newInterface->fPushGroupMarker = pushGroupMarkerFn;
33 newInterface->fPopGroupMarker = popGroupMarkerFn;
34
35 return newInterface;
36 }
37
21 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) { 38 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface* interface) {
22 GrGLInterface* newInterface = GrGLInterface::NewClone(interface); 39 GrGLInterface* newInterface = GrGLInterface::NewClone(interface);
23 40
24 newInterface->fExtensions.remove("GL_NV_path_rendering"); 41 newInterface->fExtensions.remove("GL_NV_path_rendering");
25 42
26 newInterface->fPathCommands = NULL; 43 newInterface->fPathCommands = NULL;
27 newInterface->fPathCoords = NULL; 44 newInterface->fPathCoords = NULL;
28 newInterface->fPathSubCommands = NULL; 45 newInterface->fPathSubCommands = NULL;
29 newInterface->fPathSubCoords = NULL; 46 newInterface->fPathSubCoords = NULL;
30 newInterface->fPathString = NULL; 47 newInterface->fPathString = NULL;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 , fGetQueryiv(&fFunctions.fGetQueryiv) 167 , fGetQueryiv(&fFunctions.fGetQueryiv)
151 , fGetProgramInfoLog(&fFunctions.fGetProgramInfoLog) 168 , fGetProgramInfoLog(&fFunctions.fGetProgramInfoLog)
152 , fGetProgramiv(&fFunctions.fGetProgramiv) 169 , fGetProgramiv(&fFunctions.fGetProgramiv)
153 , fGetRenderbufferParameteriv(&fFunctions.fGetRenderbufferParameteriv) 170 , fGetRenderbufferParameteriv(&fFunctions.fGetRenderbufferParameteriv)
154 , fGetShaderInfoLog(&fFunctions.fGetShaderInfoLog) 171 , fGetShaderInfoLog(&fFunctions.fGetShaderInfoLog)
155 , fGetShaderiv(&fFunctions.fGetShaderiv) 172 , fGetShaderiv(&fFunctions.fGetShaderiv)
156 , fGetString(&fFunctions.fGetString) 173 , fGetString(&fFunctions.fGetString)
157 , fGetStringi(&fFunctions.fGetStringi) 174 , fGetStringi(&fFunctions.fGetStringi)
158 , fGetTexLevelParameteriv(&fFunctions.fGetTexLevelParameteriv) 175 , fGetTexLevelParameteriv(&fFunctions.fGetTexLevelParameteriv)
159 , fGetUniformLocation(&fFunctions.fGetUniformLocation) 176 , fGetUniformLocation(&fFunctions.fGetUniformLocation)
177 , fInsertEventMarker(&fFunctions.fInsertEventMarker)
160 , fLineWidth(&fFunctions.fLineWidth) 178 , fLineWidth(&fFunctions.fLineWidth)
161 , fLinkProgram(&fFunctions.fLinkProgram) 179 , fLinkProgram(&fFunctions.fLinkProgram)
162 , fLoadIdentity(&fFunctions.fLoadIdentity) 180 , fLoadIdentity(&fFunctions.fLoadIdentity)
163 , fLoadMatrixf(&fFunctions.fLoadMatrixf) 181 , fLoadMatrixf(&fFunctions.fLoadMatrixf)
164 , fMapBuffer(&fFunctions.fMapBuffer) 182 , fMapBuffer(&fFunctions.fMapBuffer)
165 , fMatrixMode(&fFunctions.fMatrixMode) 183 , fMatrixMode(&fFunctions.fMatrixMode)
166 , fPixelStorei(&fFunctions.fPixelStorei) 184 , fPixelStorei(&fFunctions.fPixelStorei)
185 , fPopGroupMarker(&fFunctions.fPopGroupMarker)
186 , fPushGroupMarker(&fFunctions.fPushGroupMarker)
167 , fQueryCounter(&fFunctions.fQueryCounter) 187 , fQueryCounter(&fFunctions.fQueryCounter)
168 , fReadBuffer(&fFunctions.fReadBuffer) 188 , fReadBuffer(&fFunctions.fReadBuffer)
169 , fReadPixels(&fFunctions.fReadPixels) 189 , fReadPixels(&fFunctions.fReadPixels)
170 , fRenderbufferStorage(&fFunctions.fRenderbufferStorage) 190 , fRenderbufferStorage(&fFunctions.fRenderbufferStorage)
171 , fRenderbufferStorageMultisampleES2EXT(&fFunctions.fRenderbufferStorageMult isampleES2EXT) 191 , fRenderbufferStorageMultisampleES2EXT(&fFunctions.fRenderbufferStorageMult isampleES2EXT)
172 , fRenderbufferStorageMultisampleES2APPLE(&fFunctions.fRenderbufferStorageMu ltisampleES2APPLE) 192 , fRenderbufferStorageMultisampleES2APPLE(&fFunctions.fRenderbufferStorageMu ltisampleES2APPLE)
173 , fRenderbufferStorageMultisample(&fFunctions.fRenderbufferStorageMultisampl e) 193 , fRenderbufferStorageMultisample(&fFunctions.fRenderbufferStorageMultisampl e)
174 , fBindUniformLocation(&fFunctions.fBindUniformLocation) 194 , fBindUniformLocation(&fFunctions.fBindUniformLocation)
175 , fResolveMultisampleFramebuffer(&fFunctions.fResolveMultisampleFramebuffer) 195 , fResolveMultisampleFramebuffer(&fFunctions.fResolveMultisampleFramebuffer)
176 , fScissor(&fFunctions.fScissor) 196 , fScissor(&fFunctions.fScissor)
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 } 668 }
649 } else { 669 } else {
650 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_OES_vertex_array_obje ct")) { 670 if (glVer >= GR_GL_VER(3,0) || fExtensions.has("GL_OES_vertex_array_obje ct")) {
651 if (NULL == fFunctions.fBindVertexArray || 671 if (NULL == fFunctions.fBindVertexArray ||
652 NULL == fFunctions.fDeleteVertexArrays || 672 NULL == fFunctions.fDeleteVertexArrays ||
653 NULL == fFunctions.fGenVertexArrays) { 673 NULL == fFunctions.fGenVertexArrays) {
654 return false; 674 return false;
655 } 675 }
656 } 676 }
657 } 677 }
678
679 #if 0
680 if (fExtensions.has("GL_EXT_debug_marker")) {
681 if (NULL == fFunctions.fInsertEventMarker ||
682 NULL == fFunctions.fPushGroupMarker ||
683 NULL == fFunctions.fPopGroupMarker) {
684 return false;
685 }
686 }
687 #endif
658 return true; 688 return true;
659 } 689 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLExtensions.cpp ('k') | src/gpu/gl/GrGLNoOpInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698