OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #ifndef SkGLContext_DEFINED | 8 #ifndef SkGLContext_DEFINED |
9 #define SkGLContext_DEFINED | 9 #define SkGLContext_DEFINED |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 *maxFrameLag = kMaxFrameLag; | 34 *maxFrameLag = kMaxFrameLag; |
35 return true; | 35 return true; |
36 } | 36 } |
37 | 37 |
38 void makeCurrent() const; | 38 void makeCurrent() const; |
39 | 39 |
40 /** Used for testing EGLImage integration. Take a GL_TEXTURE_2D and wraps it
in an EGL Image */ | 40 /** Used for testing EGLImage integration. Take a GL_TEXTURE_2D and wraps it
in an EGL Image */ |
41 virtual GrEGLImage texture2DToEGLImage(GrGLuint /*texID*/) const { return 0;
} | 41 virtual GrEGLImage texture2DToEGLImage(GrGLuint /*texID*/) const { return 0;
} |
42 virtual void destroyEGLImage(GrEGLImage) const {} | 42 virtual void destroyEGLImage(GrEGLImage) const {} |
43 | 43 |
| 44 /** Used for testing GL_TEXTURE_RECTANGLE integration. */ |
| 45 GrGLint createTextureRectangle(int width, int height, GrGLenum internalForma
t, |
| 46 GrGLenum externalFormat, GrGLenum externalTyp
e, |
| 47 GrGLvoid* data); |
| 48 |
44 /** | 49 /** |
45 * Used for testing EGLImage integration. Takes a EGLImage and wraps it in a | 50 * Used for testing EGLImage integration. Takes a EGLImage and wraps it in a |
46 * GL_TEXTURE_EXTERNAL_OES. | 51 * GL_TEXTURE_EXTERNAL_OES. |
47 */ | 52 */ |
48 virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; } | 53 virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; } |
49 | 54 |
50 /** | 55 /** |
51 * The only purpose of this function it to provide a means of scheduling | 56 * The only purpose of this function it to provide a means of scheduling |
52 * work on the GPU (since all of the subclasses create primary buffers for | 57 * work on the GPU (since all of the subclasses create primary buffers for |
53 * testing that are small and not meant to be rendered to the screen). | 58 * testing that are small and not meant to be rendered to the screen). |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 * SK_GL(glCtx, GenTextures(1, &texID)); | 127 * SK_GL(glCtx, GenTextures(1, &texID)); |
123 */ | 128 */ |
124 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \ | 129 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \ |
125 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) | 130 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) |
126 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \ | 131 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \ |
127 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) | 132 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) |
128 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X | 133 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X |
129 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X | 134 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X |
130 | 135 |
131 #endif | 136 #endif |
OLD | NEW |