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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 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 GrDrawVerticesBatch_DEFINED 8 #ifndef GrDrawVerticesBatch_DEFINED
9 #define GrDrawVerticesBatch_DEFINED 9 #define GrDrawVerticesBatch_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 const SkPoint* positions, int vertexCount, 35 const SkPoint* positions, int vertexCount,
36 const uint16_t* indices, int indexCount, 36 const uint16_t* indices, int indexCount,
37 const GrColor* colors, const SkPoint* localCoords , 37 const GrColor* colors, const SkPoint* localCoords ,
38 const SkRect& bounds) { 38 const SkRect& bounds) {
39 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi tions, vertexCount, 39 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi tions, vertexCount,
40 indices, indexCount, colors, localCoords, bounds); 40 indices, indexCount, colors, localCoords, bounds);
41 } 41 }
42 42
43 const char* name() const override { return "DrawVerticesBatch"; } 43 const char* name() const override { return "DrawVerticesBatch"; }
44 44
45 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; 45 void computeBatchToXPOverrides(GrInitInvariantOutput* color, GrInitInvariant Output* coverage,
46 46 bool* usePLSDstRead) const override;
47 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override;
48 47
49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 48 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
50 49
51 private: 50 private:
52 void onPrepareDraws(Target*) override; 51 void onPrepareDraws(Target*) override;
53 void initBatchTracker(const GrPipelineOptimizations&) override; 52 void initBatchTracker(const GrPipelineOptimizations&) override;
54 53
55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType, 54 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType,
56 const SkMatrix& viewMatrix, 55 const SkMatrix& viewMatrix,
57 const SkPoint* positions, int vertexCount, 56 const SkPoint* positions, int vertexCount,
(...skipping 15 matching lines...) Expand all
73 int fVertexCount; 72 int fVertexCount;
74 int fIndexCount; 73 int fIndexCount;
75 bool fCoverageIgnored; // comes from initBatchTracker. 74 bool fCoverageIgnored; // comes from initBatchTracker.
76 75
77 SkSTArray<1, Geometry, true> fGeoData; 76 SkSTArray<1, Geometry, true> fGeoData;
78 77
79 typedef GrVertexBatch INHERITED; 78 typedef GrVertexBatch INHERITED;
80 }; 79 };
81 80
82 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698