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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 1293583002: Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove duplicated fields in GrVertexBatch 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 | « src/gpu/effects/GrDashingEffect.cpp ('k') | tests/GrPorterDuffTest.cpp » ('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 // 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 context->textureProvider(), &random, this->caps())); 231 context->textureProvider(), &random, this->caps()));
232 if (!rt.get()) { 232 if (!rt.get()) {
233 SkDebugf("Could not allocate render target"); 233 SkDebugf("Could not allocate render target");
234 return false; 234 return false;
235 } 235 }
236 236
237 GrPipelineBuilder pipelineBuilder; 237 GrPipelineBuilder pipelineBuilder;
238 pipelineBuilder.setRenderTarget(rt.get()); 238 pipelineBuilder.setRenderTarget(rt.get());
239 pipelineBuilder.setClip(clip); 239 pipelineBuilder.setClip(clip);
240 240
241 SkAutoTUnref<GrBatch> batch(GrRandomBatch(&random, context)); 241 SkAutoTUnref<GrDrawBatch> batch(GrRandomDrawBatch(&random, context));
242 SkASSERT(batch); 242 SkASSERT(batch);
243 243
244 GrProcessorDataManager procDataManager; 244 GrProcessorDataManager procDataManager;
245 GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps() , dummyTextures); 245 GrProcessorTestData ptd(&random, context, &procDataManager, fGpu->caps() , dummyTextures);
246 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages); 246 set_random_color_coverage_stages(&pipelineBuilder, &ptd, maxStages);
247 set_random_xpf(&pipelineBuilder, &ptd); 247 set_random_xpf(&pipelineBuilder, &ptd);
248 set_random_state(&pipelineBuilder, &random); 248 set_random_state(&pipelineBuilder, &random);
249 set_random_stencil(&pipelineBuilder, &random); 249 set_random_stencil(&pipelineBuilder, &random);
250 250
251 this->drawBatch(pipelineBuilder, batch); 251 this->drawBatch(pipelineBuilder, batch);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 #endif 297 #endif
298 GrTestTarget target; 298 GrTestTarget target;
299 context->getTestTarget(&target); 299 context->getTestTarget(&target);
300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages)); 300 REPORTER_ASSERT(reporter, target.target()->programUnitTest(context, maxStages));
301 } 301 }
302 } 302 }
303 } 303 }
304 304
305 #endif 305 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698