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

Side by Side Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 1457123002: Make block size a template parameter of SkTLList (Closed) Base URL: https://skia.googlesource.com/skia.git@forward
Patch Set: another missing typename Created 5 years, 1 month 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/batches/GrDrawPathBatch.h ('k') | src/gpu/batches/GrVertexBatch.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "GrDrawPathBatch.h" 8 #include "GrDrawPathBatch.h"
9 9
10 SkString GrDrawPathBatch::dumpInfo() const { 10 SkString GrDrawPathBatch::dumpInfo() const {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 SkASSERT(0x1 != this->stencilSettings().writeMask(pathFace)); 52 SkASSERT(0x1 != this->stencilSettings().writeMask(pathFace));
53 SkASSERT(!this->stencilSettings().isTwoSided()); 53 SkASSERT(!this->stencilSettings().isTwoSided());
54 } 54 }
55 return isWinding; 55 return isWinding;
56 } 56 }
57 57
58 GrDrawPathRangeBatch::GrDrawPathRangeBatch(const SkMatrix& viewMatrix, const SkM atrix& localMatrix, 58 GrDrawPathRangeBatch::GrDrawPathRangeBatch(const SkMatrix& viewMatrix, const SkM atrix& localMatrix,
59 GrColor color, GrPathRange* range, Gr PathRangeDraw* draw) 59 GrColor color, GrPathRange* range, Gr PathRangeDraw* draw)
60 : INHERITED(ClassID(), viewMatrix, color) 60 : INHERITED(ClassID(), viewMatrix, color)
61 , fPathRange(range) 61 , fPathRange(range)
62 , fDraws(4)
63 , fLocalMatrix(localMatrix) { 62 , fLocalMatrix(localMatrix) {
64 SkDEBUGCODE(draw->fUsedInBatch = true;) 63 SkDEBUGCODE(draw->fUsedInBatch = true;)
65 fDraws.addToHead(SkRef(draw)); 64 fDraws.addToHead(SkRef(draw));
66 fTotalPathCount = draw->count(); 65 fTotalPathCount = draw->count();
67 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy 66 // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy
68 // the entire dst. Realistically this is a moot point, because any context t hat supports 67 // the entire dst. Realistically this is a moot point, because any context t hat supports
69 // NV_path_rendering will also support NV_blend_equation_advanced. 68 // NV_path_rendering will also support NV_blend_equation_advanced.
70 // For clipping we'll just skip any optimizations based on the bounds. 69 // For clipping we'll just skip any optimizations based on the bounds.
71 fBounds.setLargest(); 70 fBounds.setLargest();
72 } 71 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 memcpy(indices, (*iter.get())->indices(), cnt * sizeof(uint16_t)); 137 memcpy(indices, (*iter.get())->indices(), cnt * sizeof(uint16_t));
139 indices += cnt; 138 indices += cnt;
140 memcpy(transforms, (*iter.get())->transforms(), cnt * floatsPerTransform * sizeof(float)); 139 memcpy(transforms, (*iter.get())->transforms(), cnt * floatsPerTransform * sizeof(float));
141 transforms += cnt * floatsPerTransform; 140 transforms += cnt * floatsPerTransform;
142 } 141 }
143 SkASSERT(indices - indexStorage.get() == fTotalPathCount); 142 SkASSERT(indices - indexStorage.get() == fTotalPathCount);
144 state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), indexStorag e.get(), 143 state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), indexStorag e.get(),
145 GrPathRange::kU16_PathIndexType, transformStorage.get(), transformType, 144 GrPathRange::kU16_PathIndexType, transformStorage.get(), transformType,
146 fTotalPathCount); 145 fTotalPathCount);
147 } 146 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.h ('k') | src/gpu/batches/GrVertexBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698