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

Side by Side Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 1117443002: create GrTestUtils.h, move some common functions into it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrOvalRenderer.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 2014 Google Inc. 2 * Copyright 2014 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 #include "GrDefaultGeoProcFactory.h" 8 #include "GrDefaultGeoProcFactory.h"
9 9
10 #include "GrInvariantOutput.h" 10 #include "GrInvariantOutput.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 if (random->nextBool()) { 259 if (random->nextBool()) {
260 flags |= GrDefaultGeoProcFactory::kCoverage_GPType; 260 flags |= GrDefaultGeoProcFactory::kCoverage_GPType;
261 } 261 }
262 if (random->nextBool()) { 262 if (random->nextBool()) {
263 flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType; 263 flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType;
264 } 264 }
265 265
266 return DefaultGeoProc::Create(flags, 266 return DefaultGeoProc::Create(flags,
267 GrRandomColor(random), 267 GrRandomColor(random),
268 GrProcessorUnitTest::TestMatrix(random), 268 GrTest::TestMatrix(random),
269 GrProcessorUnitTest::TestMatrix(random), 269 GrTest::TestMatrix(random),
270 random->nextBool(), 270 random->nextBool(),
271 GrRandomCoverage(random)); 271 GrRandomCoverage(random));
272 } 272 }
273 273
274 const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags, 274 const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
275 GrColor color, 275 GrColor color,
276 const SkMatrix& viewM atrix, 276 const SkMatrix& viewM atrix,
277 const SkMatrix& local Matrix, 277 const SkMatrix& local Matrix,
278 bool opaqueVertexColo rs, 278 bool opaqueVertexColo rs,
279 uint8_t coverage) { 279 uint8_t coverage) {
280 return DefaultGeoProc::Create(gpTypeFlags, 280 return DefaultGeoProc::Create(gpTypeFlags,
281 color, 281 color,
282 viewMatrix, 282 viewMatrix,
283 localMatrix, 283 localMatrix,
284 opaqueVertexColors, 284 opaqueVertexColors,
285 coverage); 285 coverage);
286 } 286 }
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698