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

Side by Side Diff: src/gpu/gl/GrGLUtil.cpp

Issue 917313005: Limit clear as draw workaround to Adreno 3xx. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « src/gpu/gl/GrGLUtil.h ('k') | no next file » | 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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLUtil.h" 9 #include "GrGLUtil.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 int lastDigit; 207 int lastDigit;
208 int n = sscanf(rendererString, "PowerVR SGX 54%d", &lastDigit); 208 int n = sscanf(rendererString, "PowerVR SGX 54%d", &lastDigit);
209 if (1 == n && lastDigit >= 0 && lastDigit <= 9) { 209 if (1 == n && lastDigit >= 0 && lastDigit <= 9) {
210 return kPowerVR54x_GrGLRenderer; 210 return kPowerVR54x_GrGLRenderer;
211 } 211 }
212 static const char kPowerVRRogueStr[] = "PowerVR Rogue"; 212 static const char kPowerVRRogueStr[] = "PowerVR Rogue";
213 if (0 == strncmp(rendererString, kPowerVRRogueStr, 213 if (0 == strncmp(rendererString, kPowerVRRogueStr,
214 SK_ARRAY_COUNT(kPowerVRRogueStr)-1)) { 214 SK_ARRAY_COUNT(kPowerVRRogueStr)-1)) {
215 return kPowerVRRogue_GrGLRenderer; 215 return kPowerVRRogue_GrGLRenderer;
216 } 216 }
217 int adrenoNumber;
218 n = sscanf(rendererString, "Adreno (TM) %d", &adrenoNumber);
219 if (1 == n) {
220 if (adrenoNumber >= 300) {
221 if (adrenoNumber < 400) {
222 return kAdreno3xx_GrGLRenderer;
223 }
224 if (adrenoNumber < 500) {
225 return kAdreno4xx_GrGLRenderer;
226 }
227 }
228 }
217 } 229 }
218 return kOther_GrGLRenderer; 230 return kOther_GrGLRenderer;
219 } 231 }
220 232
221 GrGLVersion GrGLGetVersion(const GrGLInterface* gl) { 233 GrGLVersion GrGLGetVersion(const GrGLInterface* gl) {
222 const GrGLubyte* v; 234 const GrGLubyte* v;
223 GR_GL_CALL_RET(gl, v, GetString(GR_GL_VERSION)); 235 GR_GL_CALL_RET(gl, v, GetString(GR_GL_VERSION));
224 return GrGLGetVersionFromString((const char*) v); 236 return GrGLGetVersionFromString((const char*) v);
225 } 237 }
226 238
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 GR_STATIC_ASSERT(2 == kGreater_StencilFunc); 314 GR_STATIC_ASSERT(2 == kGreater_StencilFunc);
303 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc); 315 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc);
304 GR_STATIC_ASSERT(4 == kLess_StencilFunc); 316 GR_STATIC_ASSERT(4 == kLess_StencilFunc);
305 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc); 317 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc);
306 GR_STATIC_ASSERT(6 == kEqual_StencilFunc); 318 GR_STATIC_ASSERT(6 == kEqual_StencilFunc);
307 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc); 319 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc);
308 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount); 320 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount);
309 321
310 return gTable[basicFunc]; 322 return gTable[basicFunc];
311 } 323 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698