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

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

Issue 1606883005: Revert to old behavior for swap buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « bench/nanobench.cpp ('k') | src/gpu/gl/SkGLContext.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 GrGLint createTextureRectangle(int width, int height, GrGLenum internalForma t, 45 GrGLint createTextureRectangle(int width, int height, GrGLenum internalForma t,
46 GrGLenum externalFormat, GrGLenum externalTyp e, 46 GrGLenum externalFormat, GrGLenum externalTyp e,
47 GrGLvoid* data); 47 GrGLvoid* data);
48 48
49 /** 49 /**
50 * 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
51 * GL_TEXTURE_EXTERNAL_OES. 51 * GL_TEXTURE_EXTERNAL_OES.
52 */ 52 */
53 virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; } 53 virtual GrGLuint eglImageToExternalTexture(GrEGLImage) const { return 0; }
54 54
55 void swapBuffers();
56
55 /** 57 /**
56 * The only purpose of this function it to provide a means of scheduling 58 * The only purpose of this function it to provide a means of scheduling
57 * work on the GPU (since all of the subclasses create primary buffers for 59 * work on the GPU (since all of the subclasses create primary buffers for
58 * testing that are small and not meant to be rendered to the screen). 60 * testing that are small and not meant to be rendered to the screen).
59 * 61 *
60 * If the platform supports fence sync (OpenGL 3.2+ or EGL_KHR_fence_sync), 62 * If the platform supports fence sync (OpenGL 3.2+ or EGL_KHR_fence_sync),
61 * this will not swap any buffers, but rather emulate triple buffer 63 * this will not swap any buffers, but rather emulate triple buffer
62 * synchronization using fences. 64 * synchronization using fences.
63 * 65 *
64 * Otherwise it will call the platform SwapBuffers method. This may or may 66 * Otherwise it will call the platform SwapBuffers method. This may or may
65 * not perform some sort of synchronization, depending on whether the 67 * not perform some sort of synchronization, depending on whether the
66 * drawing surface provided by the platform is double buffered. 68 * drawing surface provided by the platform is double buffered.
67 */ 69 */
68 void swapBuffers(); 70 void waitOnSyncOrSwap();
69 71
70 /** 72 /**
71 * This notifies the context that we are deliberately testing abandoning 73 * This notifies the context that we are deliberately testing abandoning
72 * the context. It is useful for debugging contexts that would otherwise 74 * the context. It is useful for debugging contexts that would otherwise
73 * test that GPU resources are properly deleted. It also allows a debugging 75 * test that GPU resources are properly deleted. It also allows a debugging
74 * context to test that further GL calls are not made by Skia GPU code. 76 * context to test that further GL calls are not made by Skia GPU code.
75 */ 77 */
76 void testAbandon(); 78 void testAbandon();
77 79
78 /** 80 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 * SK_GL(glCtx, GenTextures(1, &texID)); 131 * SK_GL(glCtx, GenTextures(1, &texID));
130 */ 132 */
131 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \ 133 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \
132 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 134 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
133 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \ 135 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \
134 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 136 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
135 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X 137 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X
136 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X 138 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X
137 139
138 #endif 140 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | src/gpu/gl/SkGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698