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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 864853002: remove drawType from optState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleaning Created 5 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 | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } else { 305 } else {
306 primProc = pathProc.get(); 306 primProc = pathProc.get();
307 } 307 }
308 if (!this->setupDstReadIfNecessary(&ds, &dstCopy, NULL)) { 308 if (!this->setupDstReadIfNecessary(&ds, &dstCopy, NULL)) {
309 SkDebugf("Couldn't setup dst read texture"); 309 SkDebugf("Couldn't setup dst read texture");
310 return false; 310 return false;
311 } 311 }
312 312
313 // create optimized draw state, setup readDst texture if required, and b uild a descriptor 313 // create optimized draw state, setup readDst texture if required, and b uild a descriptor
314 // and program. ODS creation can fail, so we have to check 314 // and program. ODS creation can fail, so we have to check
315 GrOptDrawState ods(ds, primProc, *gpu->caps(), scissor, &dstCopy, drawTy pe); 315 GrOptDrawState ods(ds, primProc, *gpu->caps(), scissor, &dstCopy);
316 if (ods.mustSkip()) { 316 if (ods.mustSkip()) {
317 continue; 317 continue;
318 } 318 }
319 GrBatchTracker bt; 319 GrBatchTracker bt;
320 primProc->initBatchTracker(&bt, ods.getInitBatchTracker()); 320 primProc->initBatchTracker(&bt, ods.getInitBatchTracker());
321 321
322 GrProgramDesc desc; 322 GrProgramDesc desc;
323 gpu->buildProgramDesc(&desc, *primProc, ods, ods.descInfo(), ods.drawTyp e(), bt); 323 gpu->buildProgramDesc(&desc, *primProc, ods, ods.descInfo(), drawType, b t);
324 324
325 GrGpu::DrawArgs args(primProc, &ods, &desc, &bt); 325 GrGpu::DrawArgs args(primProc, &ods, &desc, &bt, drawType);
326 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args , gpu)); 326 SkAutoTUnref<GrGLProgram> program(GrGLProgramBuilder::CreateProgram(args , gpu));
327 327
328 if (NULL == program.get()) { 328 if (NULL == program.get()) {
329 SkDebugf("Failed to create program!"); 329 SkDebugf("Failed to create program!");
330 return false; 330 return false;
331 } 331 }
332 332
333 // because occasionally optimized drawstate creation will fail for valid reasons, we only 333 // because occasionally optimized drawstate creation will fail for valid reasons, we only
334 // want to increment on success 334 // want to increment on success
335 ++t; 335 ++t;
(...skipping 29 matching lines...) Expand all
365 } 365 }
366 #endif 366 #endif
367 GrTestTarget target; 367 GrTestTarget target;
368 context->getTestTarget(&target); 368 context->getTestTarget(&target);
369 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages )); 369 REPORTER_ASSERT(reporter, target.target()->programUnitTest(maxStages ));
370 } 370 }
371 } 371 }
372 } 372 }
373 373
374 #endif 374 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698