OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrGLTypes_DEFINED | 9 #ifndef GrGLTypes_DEFINED |
10 #define GrGLTypes_DEFINED | 10 #define GrGLTypes_DEFINED |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 typedef signed long long int GrGLsizeiptr; | 51 typedef signed long long int GrGLsizeiptr; |
52 #else | 52 #else |
53 typedef signed long int GrGLintptr; | 53 typedef signed long int GrGLintptr; |
54 typedef signed long int GrGLsizeiptr; | 54 typedef signed long int GrGLsizeiptr; |
55 #endif | 55 #endif |
56 #else | 56 #else |
57 typedef signed long int GrGLintptr; | 57 typedef signed long int GrGLintptr; |
58 typedef signed long int GrGLsizeiptr; | 58 typedef signed long int GrGLsizeiptr; |
59 #endif | 59 #endif |
60 typedef void* GrGLeglImage; | 60 typedef void* GrGLeglImage; |
| 61 |
| 62 struct GrGLDrawArraysIndirectCommand { |
| 63 GrGLuint fCount; |
| 64 GrGLuint fInstanceCount; |
| 65 GrGLuint fFirst; |
| 66 GrGLuint fBaseInstance; // Requires EXT_base_instance on ES. |
| 67 }; |
| 68 |
| 69 GR_STATIC_ASSERT(16 == sizeof(GrGLDrawArraysIndirectCommand)); |
| 70 |
| 71 struct GrGLDrawElementsIndirectCommand { |
| 72 GrGLuint fCount; |
| 73 GrGLuint fInstanceCount; |
| 74 GrGLuint fFirstIndex; |
| 75 GrGLuint fBaseVertex; |
| 76 GrGLuint fBaseInstance; // Requires EXT_base_instance on ES. |
| 77 }; |
| 78 |
| 79 GR_STATIC_ASSERT(20 == sizeof(GrGLDrawElementsIndirectCommand)); |
| 80 |
| 81 /** |
| 82 * KHR_debug |
| 83 */ |
| 84 typedef void (GR_GL_FUNCTION_TYPE* GRGLDEBUGPROC)(GrGLenum source, |
| 85 GrGLenum type, |
| 86 GrGLuint id, |
| 87 GrGLenum severity, |
| 88 GrGLsizei length, |
| 89 const GrGLchar* message, |
| 90 const void* userParam); |
| 91 |
61 /** | 92 /** |
62 * EGL types. | 93 * EGL types. |
63 */ | 94 */ |
64 | |
65 typedef void* GrEGLImage; | 95 typedef void* GrEGLImage; |
66 typedef void* GrEGLDisplay; | 96 typedef void* GrEGLDisplay; |
67 typedef void* GrEGLContext; | 97 typedef void* GrEGLContext; |
68 typedef void* GrEGLClientBuffer; | 98 typedef void* GrEGLClientBuffer; |
69 typedef unsigned int GrEGLenum; | 99 typedef unsigned int GrEGLenum; |
70 typedef int32_t GrEGLint; | 100 typedef int32_t GrEGLint; |
71 typedef unsigned int GrEGLBoolean; | 101 typedef unsigned int GrEGLBoolean; |
72 | 102 |
73 /////////////////////////////////////////////////////////////////////////////// | 103 /////////////////////////////////////////////////////////////////////////////// |
74 /** | 104 /** |
75 * Types for interacting with GL resources created externally to Skia. GrBackend
Objects for GL | 105 * Types for interacting with GL resources created externally to Skia. GrBackend
Objects for GL |
76 * textures are really const GrGLTexture* | 106 * textures are really const GrGLTexture* |
77 */ | 107 */ |
78 | 108 |
79 struct GrGLTextureInfo { | 109 struct GrGLTextureInfo { |
80 GrGLenum fTarget; | 110 GrGLenum fTarget; |
81 GrGLuint fID; | 111 GrGLuint fID; |
82 }; | 112 }; |
83 | 113 |
84 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrGLTextureInfo*)); | 114 GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrGLTextureInfo*)); |
85 | 115 |
86 #endif | 116 #endif |
OLD | NEW |