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

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

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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
« no previous file with comments | « include/gpu/gl/GrGLExtensions.h ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
28 */ 28 */
29 bool init(const int width, const int height); 29 bool init(const int width, const int height);
30 30
31 int getFBOID() const { return fFBO; } 31 int getFBOID() const { return fFBO; }
32 32
33 const GrGLInterface* gl() const { return fGL; } 33 const GrGLInterface* gl() const { return fGL; }
34 34
35 virtual void makeCurrent() const = 0; 35 virtual void makeCurrent() const = 0;
36 36
37 bool hasExtension(const char* extensionName) const { 37 bool hasExtension(const char* extensionName) const {
38 GrAssert(NULL != fGL); 38 SkASSERT(NULL != fGL);
39 return fExtensions.has(extensionName); 39 return fExtensions.has(extensionName);
40 } 40 }
41 41
42 protected: 42 protected:
43 /** 43 /**
44 * Subclass implements this to make a GL context. The returned GrGLInterface 44 * Subclass implements this to make a GL context. The returned GrGLInterface
45 * should be populated with functions compatible with the context. The 45 * should be populated with functions compatible with the context. The
46 * format and size of backbuffers does not matter since an FBO will be 46 * format and size of backbuffers does not matter since an FBO will be
47 * created. 47 * created.
48 */ 48 */
(...skipping 19 matching lines...) Expand all
68 * SK_GL(glCtx, GenTextures(1, &texID)); 68 * SK_GL(glCtx, GenTextures(1, &texID));
69 */ 69 */
70 #define SK_GL(ctx, X) (ctx).gl()->f ## X; \ 70 #define SK_GL(ctx, X) (ctx).gl()->f ## X; \
71 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 71 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError())
72 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->f ## X; \ 72 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->f ## X; \
73 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 73 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError())
74 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->f ## X 74 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->f ## X
75 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->f ## X 75 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->f ## X
76 76
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLExtensions.h ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698