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

Side by Side Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 1352813003: add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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
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 "GrDashingEffect.h" 8 #include "GrDashingEffect.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 SkMatrix fViewMatrix; 250 SkMatrix fViewMatrix;
251 SkMatrix fSrcRotInv; 251 SkMatrix fSrcRotInv;
252 SkPoint fPtsRot[2]; 252 SkPoint fPtsRot[2];
253 SkScalar fSrcStrokeWidth; 253 SkScalar fSrcStrokeWidth;
254 SkScalar fPhase; 254 SkScalar fPhase;
255 SkScalar fIntervals[2]; 255 SkScalar fIntervals[2];
256 SkScalar fParallelScale; 256 SkScalar fParallelScale;
257 SkScalar fPerpendicularScale; 257 SkScalar fPerpendicularScale;
258 }; 258 };
259 259
260 BATCH_CLASS_ID
261
260 static GrDrawBatch* Create(const Geometry& geometry, SkPaint::Cap cap, DashA AMode aaMode, 262 static GrDrawBatch* Create(const Geometry& geometry, SkPaint::Cap cap, DashA AMode aaMode,
261 bool fullDash) { 263 bool fullDash) {
262 return new DashBatch(geometry, cap, aaMode, fullDash); 264 return new DashBatch(geometry, cap, aaMode, fullDash);
263 } 265 }
264 266
265 const char* name() const override { return "DashBatch"; } 267 const char* name() const override { return "DashBatch"; }
266 268
267 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 269 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
268 // When this is called on a batch, there is only one geometry bundle 270 // When this is called on a batch, there is only one geometry bundle
269 out->setKnownFourComponents(fGeoData[0].fColor); 271 out->setKnownFourComponents(fGeoData[0].fColor);
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 info.fIntervals = intervals; 1276 info.fIntervals = intervals;
1275 info.fCount = 2; 1277 info.fCount = 2;
1276 info.fPhase = phase; 1278 info.fPhase = phase;
1277 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info); 1279 SkDEBUGCODE(bool success = ) strokeInfo.setDashInfo(info);
1278 SkASSERT(success); 1280 SkASSERT(success);
1279 1281
1280 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT); 1282 return create_batch(color, viewMatrix, pts, useAA, strokeInfo, msaaRT);
1281 } 1283 }
1282 1284
1283 #endif 1285 #endif
OLDNEW
« src/gpu/batches/GrBatch.h ('K') | « src/gpu/batches/GrTessellatingPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698