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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 684223002: cleanup reentrance logic in CMM (Closed) Base URL: https://skia.googlesource.com/skia.git@drawtarget_on_clip_manager
Patch Set: feedback inc Created 6 years, 1 month 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/GrDrawState.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 /* 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 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } 321 }
322 322
323 static void set_random_hints(GrGpuGL* gpu, SkRandom* random) { 323 static void set_random_hints(GrGpuGL* gpu, SkRandom* random) {
324 for (int i = 1; i <= GrDrawState::kLast_Hint; i <<= 1) { 324 for (int i = 1; i <= GrDrawState::kLast_Hint; i <<= 1) {
325 gpu->drawState()->setHint(GrDrawState::Hints(i), random->nextBool()); 325 gpu->drawState()->setHint(GrDrawState::Hints(i), random->nextBool());
326 } 326 }
327 } 327 }
328 328
329 static void set_random_state(GrGpuGL* gpu, SkRandom* random) { 329 static void set_random_state(GrGpuGL* gpu, SkRandom* random) {
330 int state = 0; 330 int state = 0;
331 for (int i = 1; i <= GrDrawState::kLastPublicStateBit; i <<= 1) { 331 for (int i = 1; i <= GrDrawState::kLast_StateBit; i <<= 1) {
332 state |= random->nextBool() * i; 332 state |= random->nextBool() * i;
333 } 333 }
334 gpu->drawState()->enableState(state); 334 gpu->drawState()->enableState(state);
335 } 335 }
336 336
337 // this function will randomly pick non-self referencing blend modes 337 // this function will randomly pick non-self referencing blend modes
338 static void set_random_blend_func(GrGpuGL* gpu, SkRandom* random) { 338 static void set_random_blend_func(GrGpuGL* gpu, SkRandom* random) {
339 GrBlendCoeff src; 339 GrBlendCoeff src;
340 do { 340 do {
341 src = GrBlendCoeff(random->nextRangeU(kFirstPublicGrBlendCoeff, kLastPub licGrBlendCoeff)); 341 src = GrBlendCoeff(random->nextRangeU(kFirstPublicGrBlendCoeff, kLastPub licGrBlendCoeff));
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 if (type == GrContextFactory::kANGLE_GLContextType) { 506 if (type == GrContextFactory::kANGLE_GLContextType) {
507 maxStages = 3; 507 maxStages = 3;
508 } 508 }
509 #endif 509 #endif
510 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages)); 510 REPORTER_ASSERT(reporter, gpu->programUnitTest(maxStages));
511 } 511 }
512 } 512 }
513 } 513 }
514 514
515 #endif 515 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698