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

Side by Side Diff: include/gpu/gl/GrGLInterface.h

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: rebase, readd null interface to main lib Created 4 years, 8 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
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 #ifndef GrGLInterface_DEFINED 8 #ifndef GrGLInterface_DEFINED
9 #define GrGLInterface_DEFINED 9 #define GrGLInterface_DEFINED
10 10
(...skipping 25 matching lines...) Expand all
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 SK_MESA
47 /**
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();
65 #endif
66
67 /**
68 * Creates a null GrGLInterface that doesn't draw anything. Used for measuring
69 * CPU overhead.
70 */
71 const SK_API GrGLInterface* GrGLCreateNullInterface();
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
79 #if GR_GL_PER_GL_FUNC_CALLBACK 46 #if GR_GL_PER_GL_FUNC_CALLBACK
80 typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); 47 typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*);
81 typedef intptr_t GrGLInterfaceCallbackData; 48 typedef intptr_t GrGLInterfaceCallbackData;
82 #endif 49 #endif
83 50
51 /**
52 * 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
54 * Chromium is using it in its unit tests.
55 */
56 const SK_API GrGLInterface* GrGLCreateNullInterface();
57
84 /** Function that returns a new interface identical to "interface" but without s upport for 58 /** Function that returns a new interface identical to "interface" but without s upport for
85 GL_NV_path_rendering. */ 59 GL_NV_path_rendering. */
86 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); 60 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*);
87 61
88 /** Function that returns a new interface identical to "interface" but with supp ort for 62 /** Function that returns a new interface identical to "interface" but with supp ort for
89 test version of GL_EXT_debug_marker. */ 63 test version of GL_EXT_debug_marker. */
90 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, 64 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*,
91 GrGLInsertEventMarkerProc i nsertEventMarkerFn, 65 GrGLInsertEventMarkerProc i nsertEventMarkerFn,
92 GrGLPushGroupMarkerProc pus hGroupMarkerFn, 66 GrGLPushGroupMarkerProc pus hGroupMarkerFn,
93 GrGLPopGroupMarkerProc popG roupMarkerFn); 67 GrGLPopGroupMarkerProc popG roupMarkerFn);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 #if GR_GL_PER_GL_FUNC_CALLBACK 470 #if GR_GL_PER_GL_FUNC_CALLBACK
497 GrGLInterfaceCallbackProc fCallback; 471 GrGLInterfaceCallbackProc fCallback;
498 GrGLInterfaceCallbackData fCallbackData; 472 GrGLInterfaceCallbackData fCallbackData;
499 #endif 473 #endif
500 474
501 // This exists for internal testing. 475 // This exists for internal testing.
502 virtual void abandon() const {} 476 virtual void abandon() const {}
503 }; 477 };
504 478
505 #endif 479 #endif
OLDNEW
« no previous file with comments | « gyp/visualbench.gyp ('k') | include/gpu/gl/SkGLContext.h » ('j') | samplecode/SampleApp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698