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

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

Issue 1268953002: Make ANGLE perf decisions be runtime rather than compile time (Closed) Base URL: https://skia.googlesource.com/skia.git@fixrpspeed
Patch Set: Address comments Created 5 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
« no previous file with comments | « no previous file | include/gpu/gl/GrGLConfig_chrome.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 2011 Google Inc. 3 * Copyright 2011 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 8
9 9
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * 58 *
59 * GR_GL_PER_GL_FUNC_CALLBACK: When set to 1 the GrGLInterface object provides 59 * GR_GL_PER_GL_FUNC_CALLBACK: When set to 1 the GrGLInterface object provides
60 * a function pointer that is called just before every gl function. The ptr must 60 * a function pointer that is called just before every gl function. The ptr must
61 * be valid (i.e. there is no NULL check). However, by default the callback will 61 * be valid (i.e. there is no NULL check). However, by default the callback will
62 * be set to a function that does nothing. The signature of the function is: 62 * be set to a function that does nothing. The signature of the function is:
63 * void function(const GrGLInterface*) 63 * void function(const GrGLInterface*)
64 * It is not extern "C". 64 * It is not extern "C".
65 * The GrGLInterface field fCallback specifies the function ptr and there is an 65 * The GrGLInterface field fCallback specifies the function ptr and there is an
66 * additional field fCallbackData of type intptr_t for client data. 66 * additional field fCallbackData of type intptr_t for client data.
67 * 67 *
68 * GR_GL_RGBA_8888_PIXEL_OPS_SLOW: Set this to 1 if it is known that performing
69 * glReadPixels / glTex(Sub)Image with format=GL_RGBA, type=GL_UNISIGNED_BYTE is
70 * significantly slower than format=GL_BGRA, type=GL_UNISIGNED_BYTE.
71 *
72 * GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL: Set this to 1 if calling
73 * glReadPixels to read the entire framebuffer is faster than calling it with
74 * the same sized rectangle but with a framebuffer bound that is larger than
75 * the rectangle read.
76 *
77 * GR_GL_CHECK_ALLOC_WITH_GET_ERROR: If set to 1 this will then glTexImage, 68 * GR_GL_CHECK_ALLOC_WITH_GET_ERROR: If set to 1 this will then glTexImage,
78 * glBufferData, glRenderbufferStorage, etc will be checked for errors. This 69 * glBufferData, glRenderbufferStorage, etc will be checked for errors. This
79 * amounts to ensuring the error is GL_NO_ERROR, calling the allocating 70 * amounts to ensuring the error is GL_NO_ERROR, calling the allocating
80 * function, and then checking that the error is still GL_NO_ERROR. When the 71 * function, and then checking that the error is still GL_NO_ERROR. When the
81 * value is 0 we will assume no error was generated without checking. 72 * value is 0 we will assume no error was generated without checking.
82 * 73 *
83 * GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT: We will normally check the FBO status 74 * GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT: We will normally check the FBO status
84 * every time we bind a texture or renderbuffer to an FBO. However, in some 75 * every time we bind a texture or renderbuffer to an FBO. However, in some
85 * environments CheckFrameBufferStatus is very expensive. If this is set we will 76 * environments CheckFrameBufferStatus is very expensive. If this is set we will
86 * check the first time we use a color format or a combination of color / 77 * check the first time we use a color format or a combination of color /
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 #endif 112 #endif
122 113
123 #if !defined(GR_GL_USE_BUFFER_DATA_NULL_HINT) 114 #if !defined(GR_GL_USE_BUFFER_DATA_NULL_HINT)
124 #define GR_GL_USE_BUFFER_DATA_NULL_HINT 1 115 #define GR_GL_USE_BUFFER_DATA_NULL_HINT 1
125 #endif 116 #endif
126 117
127 #if !defined(GR_GL_PER_GL_FUNC_CALLBACK) 118 #if !defined(GR_GL_PER_GL_FUNC_CALLBACK)
128 #define GR_GL_PER_GL_FUNC_CALLBACK 0 119 #define GR_GL_PER_GL_FUNC_CALLBACK 0
129 #endif 120 #endif
130 121
131 #if !defined(GR_GL_RGBA_8888_PIXEL_OPS_SLOW)
132 #define GR_GL_RGBA_8888_PIXEL_OPS_SLOW 0
133 #endif
134
135 #if !defined(GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL)
136 #define GR_GL_FULL_READPIXELS_FASTER_THAN_PARTIAL 0
137 #endif
138
139 #if !defined(GR_GL_CHECK_ALLOC_WITH_GET_ERROR) 122 #if !defined(GR_GL_CHECK_ALLOC_WITH_GET_ERROR)
140 #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 1 123 #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 1
141 #endif 124 #endif
142 125
143 #if !defined(GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT) 126 #if !defined(GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT)
144 #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 0 127 #define GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT 0
145 #endif 128 #endif
146 129
147 #if !defined(GR_GL_MUST_USE_VBO) 130 #if !defined(GR_GL_MUST_USE_VBO)
148 #define GR_GL_MUST_USE_VBO 0 131 #define GR_GL_MUST_USE_VBO 0
(...skipping 28 matching lines...) Expand all
177 * Hopefully we will understand this better and have a cleaner fix or get a 160 * Hopefully we will understand this better and have a cleaner fix or get a
178 * OS/driver level fix. 161 * OS/driver level fix.
179 */ 162 */
180 #if (defined(SK_BUILD_FOR_MAC) && !GR_GL_USE_BUFFER_DATA_NULL_HINT) 163 #if (defined(SK_BUILD_FOR_MAC) && !GR_GL_USE_BUFFER_DATA_NULL_HINT)
181 # define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND 1 164 # define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND 1
182 #else 165 #else
183 # define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND 0 166 # define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND 0
184 #endif 167 #endif
185 168
186 #endif 169 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/gl/GrGLConfig_chrome.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698