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

Side by Side Diff: src/gpu/batches/GrDrawAtlasBatch.h

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT 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
« no previous file with comments | « src/gpu/batches/GrCopySurfaceBatch.cpp ('k') | src/gpu/batches/GrDrawPathBatch.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 #ifndef GrDrawAtlasBatch_DEFINED 8 #ifndef GrDrawAtlasBatch_DEFINED
9 #define GrDrawAtlasBatch_DEFINED 9 #define GrDrawAtlasBatch_DEFINED
10 10
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrDefaultGeoProcFactory.h" 12 #include "GrDefaultGeoProcFactory.h"
13 #include "GrVertexBatch.h" 13 #include "GrVertexBatch.h"
14 14
15 class GrDrawAtlasBatch : public GrVertexBatch { 15 class GrDrawAtlasBatch : public GrVertexBatch {
16 public: 16 public:
17 struct Geometry { 17 struct Geometry {
18 GrColor fColor; 18 GrColor fColor;
19 SkTArray<uint8_t, true> fVerts; 19 SkTArray<uint8_t, true> fVerts;
20 }; 20 };
21 21
22 static GrDrawBatch* Create(const Geometry& geometry, const SkMatrix& viewMat rix, 22 static GrDrawBatch* Create(const Geometry& geometry, const SkMatrix& viewMat rix,
23 int spriteCount, const SkRSXform* xforms, const S kRect* rects, 23 int spriteCount, const SkRSXform* xforms, const S kRect* rects,
24 const SkColor* colors) { 24 const SkColor* colors) {
25 return SkNEW_ARGS(GrDrawAtlasBatch, (geometry, viewMatrix, spriteCount, 25 return new GrDrawAtlasBatch(geometry, viewMatrix, spriteCount, xforms, r ects, colors);
26 xforms, rects, colors));
27 } 26 }
28 27
29 const char* name() const override { return "DrawAtlasBatch"; } 28 const char* name() const override { return "DrawAtlasBatch"; }
30 29
31 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 30 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
32 // When this is called on a batch, there is only one geometry bundle 31 // When this is called on a batch, there is only one geometry bundle
33 if (this->hasColors()) { 32 if (this->hasColors()) {
34 out->setUnknownFourComponents(); 33 out->setUnknownFourComponents();
35 } else { 34 } else {
36 out->setKnownFourComponents(fGeoData[0].fColor); 35 out->setKnownFourComponents(fGeoData[0].fColor);
(...skipping 26 matching lines...) Expand all
63 62
64 SkMatrix fViewMatrix; 63 SkMatrix fViewMatrix;
65 GrColor fColor; 64 GrColor fColor;
66 int fQuadCount; 65 int fQuadCount;
67 bool fColorIgnored; 66 bool fColorIgnored;
68 bool fCoverageIgnored; 67 bool fCoverageIgnored;
69 bool fHasColors; 68 bool fHasColors;
70 }; 69 };
71 70
72 #endif 71 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrCopySurfaceBatch.cpp ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698