OLD | NEW |
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 #ifndef GrGLInterface_DEFINED | 8 #ifndef GrGLInterface_DEFINED |
9 #define GrGLInterface_DEFINED | 9 #define GrGLInterface_DEFINED |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 const GrGLInterface* GrGLDefaultInterface(); | 37 const GrGLInterface* GrGLDefaultInterface(); |
38 | 38 |
39 /** | 39 /** |
40 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, | 40 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, |
41 * GLX on linux, AGL on Mac). The interface is only valid for the GL context | 41 * GLX on linux, AGL on Mac). The interface is only valid for the GL context |
42 * that is current when the interface is created. | 42 * that is current when the interface is created. |
43 */ | 43 */ |
44 SK_API const GrGLInterface* GrGLCreateNativeInterface(); | 44 SK_API const GrGLInterface* GrGLCreateNativeInterface(); |
45 | 45 |
46 #if GR_GL_PER_GL_FUNC_CALLBACK | 46 #if SK_MESA |
47 typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); | 47 /** |
48 typedef intptr_t GrGLInterfaceCallbackData; | 48 * Creates a GrGLInterface for an OSMesa context. |
| 49 */ |
| 50 SK_API const GrGLInterface* GrGLCreateMesaInterface(); |
| 51 #endif |
| 52 |
| 53 #if SK_ANGLE |
| 54 /** |
| 55 * Creates a GrGLInterface for an ANGLE context. |
| 56 */ |
| 57 SK_API const GrGLInterface* GrGLCreateANGLEInterface(); |
| 58 #endif |
| 59 |
| 60 #if SK_COMMAND_BUFFER |
| 61 /** |
| 62 * Creates a GrGLInterface for a Command Buffer context. |
| 63 */ |
| 64 SK_API const GrGLInterface* GrGLCreateCommandBufferInterface(); |
49 #endif | 65 #endif |
50 | 66 |
51 /** | 67 /** |
52 * Creates a null GrGLInterface that doesn't draw anything. Used for measuring | 68 * Creates a null GrGLInterface that doesn't draw anything. Used for measuring |
53 * CPU overhead. TODO: We would like to move this to tools/gpu/gl/null but curre
ntly | 69 * CPU overhead. |
54 * Chromium is using it in its unit tests. | |
55 */ | 70 */ |
56 const SK_API GrGLInterface* GrGLCreateNullInterface(); | 71 const SK_API GrGLInterface* GrGLCreateNullInterface(); |
57 | 72 |
| 73 /** |
| 74 * Creates a debugging GrGLInterface that doesn't draw anything. Used for |
| 75 * finding memory leaks and invalid memory accesses. |
| 76 */ |
| 77 const GrGLInterface* GrGLCreateDebugInterface(); |
| 78 |
58 /** Function that returns a new interface identical to "interface" but without s
upport for | 79 /** Function that returns a new interface identical to "interface" but without s
upport for |
59 GL_NV_path_rendering. */ | 80 GL_NV_path_rendering. */ |
60 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); | 81 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); |
61 | 82 |
62 /** Function that returns a new interface identical to "interface" but with supp
ort for | 83 /** Function that returns a new interface identical to "interface" but with supp
ort for |
63 test version of GL_EXT_debug_marker. */ | 84 test version of GL_EXT_debug_marker. */ |
64 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, | 85 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, |
65 GrGLInsertEventMarkerProc i
nsertEventMarkerFn, | 86 GrGLInsertEventMarkerProc i
nsertEventMarkerFn, |
66 GrGLPushGroupMarkerProc pus
hGroupMarkerFn, | 87 GrGLPushGroupMarkerProc pus
hGroupMarkerFn, |
67 GrGLPopGroupMarkerProc popG
roupMarkerFn); | 88 GrGLPopGroupMarkerProc popG
roupMarkerFn); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 /* EGL functions */ | 485 /* EGL functions */ |
465 GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage; | 486 GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage; |
466 GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage; | 487 GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage; |
467 } fFunctions; | 488 } fFunctions; |
468 | 489 |
469 // This exists for internal testing. | 490 // This exists for internal testing. |
470 virtual void abandon() const {} | 491 virtual void abandon() const {} |
471 }; | 492 }; |
472 | 493 |
473 #endif | 494 #endif |
OLD | NEW |