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

Side by Side Diff: tests/PrimitiveProcessorTest.cpp

Issue 2086293006: Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 5 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 | « tests/GLProgramsTest.cpp ('k') | tools/gpu/GrTest.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 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 // This is a GPU-backend specific test. It relies on static intializers to work 8 // This is a GPU-backend specific test. It relies on static intializers to work
9 9
10 #include "SkTypes.h" 10 #include "SkTypes.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 ERRORF(reporter, "No attributes allowed?!"); 115 ERRORF(reporter, "No attributes allowed?!");
116 return; 116 return;
117 } 117 }
118 context->flush(); 118 context->flush();
119 context->resetGpuStats(); 119 context->resetGpuStats();
120 #if GR_GPU_STATS 120 #if GR_GPU_STATS
121 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); 121 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
122 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0) ; 122 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0) ;
123 #endif 123 #endif
124 SkAutoTUnref<GrDrawBatch> batch; 124 SkAutoTUnref<GrDrawBatch> batch;
125 GrPipelineBuilder pb; 125 GrPaint grPaint;
126 // This one should succeed. 126 // This one should succeed.
127 batch.reset(new Batch(attribCnt)); 127 batch.reset(new Batch(attribCnt));
128 drawContext->drawContextPriv().testingOnly_drawBatch(pb, batch); 128 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
129 context->flush(); 129 context->flush();
130 #if GR_GPU_STATS 130 #if GR_GPU_STATS
131 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1); 131 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1);
132 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0) ; 132 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0) ;
133 #endif 133 #endif
134 context->resetGpuStats(); 134 context->resetGpuStats();
135 // This one should fail. 135 // This one should fail.
136 batch.reset(new Batch(attribCnt+1)); 136 batch.reset(new Batch(attribCnt+1));
137 drawContext->drawContextPriv().testingOnly_drawBatch(pb, batch); 137 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
138 context->flush(); 138 context->flush();
139 #if GR_GPU_STATS 139 #if GR_GPU_STATS
140 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); 140 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
141 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ; 141 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ;
142 #endif 142 #endif
143 } 143 }
144 #endif 144 #endif
OLDNEW
« no previous file with comments | « tests/GLProgramsTest.cpp ('k') | tools/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698