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

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

Issue 1612513002: Add a background timing thread to kilobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kilobench logs gpu numbers Created 4 years, 10 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 | tools/kilobench/kilobench.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 SkGLContext_DEFINED 8 #ifndef SkGLContext_DEFINED
9 #define SkGLContext_DEFINED 9 #define SkGLContext_DEFINED
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void testAbandon(); 78 void testAbandon();
79 79
80 /** 80 /**
81 * Creates a new GL context of the same type and makes the returned context current 81 * Creates a new GL context of the same type and makes the returned context current
82 * (if not null). 82 * (if not null).
83 */ 83 */
84 virtual SkGLContext* createNew() const { return nullptr; } 84 virtual SkGLContext* createNew() const { return nullptr; }
85 85
86 class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL fu nctionality. 86 class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL fu nctionality.
87 87
88 /*
89 * returns the fencesync object owned by this SkGLContext
90 */
91 SkGpuFenceSync* fenceSync() { return fFenceSync.get(); }
92
88 protected: 93 protected:
89 SkGLContext(); 94 SkGLContext();
90 95
91 /* 96 /*
92 * Methods that sublcasses must call from their constructors and destructors . 97 * Methods that sublcasses must call from their constructors and destructors .
93 */ 98 */
94 void init(const GrGLInterface*, SkGpuFenceSync* = NULL); 99 void init(const GrGLInterface*, SkGpuFenceSync* = NULL);
95 void teardown(); 100 void teardown();
96 101
97 /* 102 /*
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 * SK_GL(glCtx, GenTextures(1, &texID)); 136 * SK_GL(glCtx, GenTextures(1, &texID));
132 */ 137 */
133 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \ 138 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \
134 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 139 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
135 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \ 140 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \
136 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 141 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
137 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X 142 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X
138 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X 143 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X
139 144
140 #endif 145 #endif
OLDNEW
« no previous file with comments | « no previous file | tools/kilobench/kilobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698