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

Side by Side Diff: src/gpu/batches/GrTInstanceBatch.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/GrStrokeRectBatch.h ('k') | src/gpu/effects/GrBezierEffect.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 GrTInstanceBatch_DEFINED 8 #ifndef GrTInstanceBatch_DEFINED
9 #define GrTInstanceBatch_DEFINED 9 #define GrTInstanceBatch_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 * const GrIndexBuffer* GetIndexBuffer(GrResourceProvider*) 35 * const GrIndexBuffer* GetIndexBuffer(GrResourceProvider*)
36 * 36 *
37 * Tesselate(intptr_t vertices, size_t vertexStride, const Geometry& geo, 37 * Tesselate(intptr_t vertices, size_t vertexStride, const Geometry& geo,
38 * const GrPipelineOptimizations& opts) 38 * const GrPipelineOptimizations& opts)
39 */ 39 */
40 template <typename Impl> 40 template <typename Impl>
41 class GrTInstanceBatch : public GrVertexBatch { 41 class GrTInstanceBatch : public GrVertexBatch {
42 public: 42 public:
43 typedef typename Impl::Geometry Geometry; 43 typedef typename Impl::Geometry Geometry;
44 44
45 static GrTInstanceBatch* Create() { 45 static GrTInstanceBatch* Create() { return new GrTInstanceBatch; }
46 return SkNEW(GrTInstanceBatch);
47 }
48 46
49 const char* name() const override { return Impl::Name(); } 47 const char* name() const override { return Impl::Name(); }
50 48
51 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { 49 void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
52 // When this is called on a batch, there is only one geometry bundle 50 // When this is called on a batch, there is only one geometry bundle
53 out->setKnownFourComponents(fGeoData[0].fColor); 51 out->setKnownFourComponents(fGeoData[0].fColor);
54 } 52 }
55 53
56 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 54 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
57 Impl::InitInvariantOutputCoverage(out); 55 Impl::InitInvariantOutputCoverage(out);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin()) ; 132 fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin()) ;
135 this->joinBounds(that->bounds()); 133 this->joinBounds(that->bounds());
136 return true; 134 return true;
137 } 135 }
138 136
139 GrPipelineOptimizations fOpts; 137 GrPipelineOptimizations fOpts;
140 SkSTArray<1, Geometry, true> fGeoData; 138 SkSTArray<1, Geometry, true> fGeoData;
141 }; 139 };
142 140
143 #endif 141 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStrokeRectBatch.h ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698