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

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

Issue 133073009: Move GrGLInterface function pointers into a nested struct (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tip of tree Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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 SkGLContextHelper_DEFINED 8 #ifndef SkGLContextHelper_DEFINED
9 #define SkGLContextHelper_DEFINED 9 #define SkGLContextHelper_DEFINED
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 GrGLuint fDepthStencilBufferID; 70 GrGLuint fDepthStencilBufferID;
71 const GrGLInterface* fGL; 71 const GrGLInterface* fGL;
72 72
73 typedef SkRefCnt INHERITED; 73 typedef SkRefCnt INHERITED;
74 }; 74 };
75 75
76 /** 76 /**
77 * Helper macros for using the GL context through the GrGLInterface. Example: 77 * Helper macros for using the GL context through the GrGLInterface. Example:
78 * SK_GL(glCtx, GenTextures(1, &texID)); 78 * SK_GL(glCtx, GenTextures(1, &texID));
79 */ 79 */
80 #define SK_GL(ctx, X) (ctx).gl()->f ## X; \ 80 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \
81 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 81 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fFunctions.fGetErro r())
82 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->f ## X; \ 82 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \
83 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 83 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fFunctions.fGetError())
84 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->f ## X 84 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X
85 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->f ## X 85 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X
86 86
87 #endif 87 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698