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

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

Issue 141813002: Adding SK_API to SkGLContextHelper and SkNullGLContext for use in blink unit test component build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try again 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
« no previous file with comments | « no previous file | include/gpu/gl/SkNullGLContext.h » ('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
11 #include "GrGLInterface.h" 11 #include "GrGLInterface.h"
12 12
13 /** 13 /**
14 * Create an offscreen opengl context with an RGBA8 / 8bit stencil FBO. 14 * Create an offscreen opengl context with an RGBA8 / 8bit stencil FBO.
15 * Provides a GrGLInterface struct of function pointers for the context. 15 * Provides a GrGLInterface struct of function pointers for the context.
16 */ 16 */
17 17
18 class SkGLContextHelper : public SkRefCnt { 18 class SK_API SkGLContextHelper : public SkRefCnt {
19 public: 19 public:
20 SK_DECLARE_INST_COUNT(SkGLContextHelper) 20 SK_DECLARE_INST_COUNT(SkGLContextHelper)
21 21
22 SkGLContextHelper(); 22 SkGLContextHelper();
23 virtual ~SkGLContextHelper(); 23 virtual ~SkGLContextHelper();
24 24
25 /** 25 /**
26 * Initializes the context and makes it current. 26 * Initializes the context and makes it current.
27 */ 27 */
28 bool init(const int width, const int height); 28 bool init(const int width, const int height);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->f ## X; \
81 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 81 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError())
82 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->f ## X; \ 82 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->f ## X; \
83 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError()) 83 SkASSERT(GR_GL_NO_ERROR == (ctx).gl()->fGetError())
84 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->f ## X 84 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->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()->f ## X
86 86
87 #endif 87 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/gl/SkNullGLContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698