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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 630063002: Make createOptDrawState return NULL if we would end up not drawing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase and Nits Created 6 years, 2 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/GrGpuGL_program.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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 dstTexture, 325 dstTexture,
326 geometryProcessor.get(), 326 geometryProcessor.get(),
327 stages.get(), 327 stages.get(),
328 numColorStages, 328 numColorStages,
329 numCoverageStages, 329 numCoverageStages,
330 currAttribIndex, 330 currAttribIndex,
331 drawType)) { 331 drawType)) {
332 return false; 332 return false;
333 } 333 }
334 334
335 SkAutoTUnref<GrOptDrawState> optState(this->getDrawState().createOptStat e(*this->caps())); 335 SkAutoTUnref<GrOptDrawState> optState(GrOptDrawState::Create(this->getDr awState(),
336 *this->caps (),
337 drawType));
336 SkAutoTUnref<GrGLProgram> program(GrGLProgram::Create(this, 338 SkAutoTUnref<GrGLProgram> program(GrGLProgram::Create(this,
337 *optState.get(), 339 *optState.get(),
338 pdesc, 340 pdesc,
339 geometryProcessor. get(), 341 geometryProcessor. get(),
340 stages, 342 stages,
341 stages + numColorS tages)); 343 stages + numColorS tages));
342 for (int s = 0; s < numStages; ++s) { 344 for (int s = 0; s < numStages; ++s) {
343 SkDELETE(stages[s]); 345 SkDELETE(stages[s]);
344 } 346 }
345 if (NULL == program.get()) { 347 if (NULL == program.get()) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1)); 390 SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar1));
389 GrConfigConversionEffect::Create(NULL, 391 GrConfigConversionEffect::Create(NULL,
390 false, 392 false,
391 GrConfigConversionEffect::kNone_PMConversio n, 393 GrConfigConversionEffect::kNone_PMConversio n,
392 SkMatrix::I()); 394 SkMatrix::I());
393 SkScalar matrix[20]; 395 SkScalar matrix[20];
394 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix)); 396 SkAutoTUnref<SkColorMatrixFilter> cmf(SkColorMatrixFilter::Create(matrix));
395 } 397 }
396 398
397 #endif 399 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698