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

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

Issue 1286043004: Make GrVertexBatch objects hold their own draws during GrDrawTarget flush (Closed) Base URL: https://skia.googlesource.com/skia.git@m
Patch Set: forward decl Created 5 years, 4 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/GrBWFillRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('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
(...skipping 24 matching lines...) Expand all
35 } else { 35 } else {
36 out->setKnownFourComponents(fGeoData[0].fColor); 36 out->setKnownFourComponents(fGeoData[0].fColor);
37 } 37 }
38 } 38 }
39 39
40 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { 40 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
41 out->setKnownSingleComponent(0xff); 41 out->setKnownSingleComponent(0xff);
42 } 42 }
43 43
44 void initBatchTracker(const GrPipelineOptimizations&) override; 44 void initBatchTracker(const GrPipelineOptimizations&) override;
45 void generateGeometry(GrBatchTarget* batchTarget) override;
46 45
47 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } 46 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
48 47
49 private: 48 private:
49 void onPrepareDraws(Target*) override;
50
50 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s priteCount, 51 GrDrawAtlasBatch(const Geometry& geometry, const SkMatrix& viewMatrix, int s priteCount,
51 const SkRSXform* xforms, const SkRect* rects, const SkColor * colors); 52 const SkRSXform* xforms, const SkRect* rects, const SkColor * colors);
52 53
53 GrColor color() const { return fColor; } 54 GrColor color() const { return fColor; }
54 bool colorIgnored() const { return fColorIgnored; } 55 bool colorIgnored() const { return fColorIgnored; }
55 const SkMatrix& viewMatrix() const { return fViewMatrix; } 56 const SkMatrix& viewMatrix() const { return fViewMatrix; }
56 bool hasColors() const { return fHasColors; } 57 bool hasColors() const { return fHasColors; }
57 int quadCount() const { return fQuadCount; } 58 int quadCount() const { return fQuadCount; }
58 bool coverageIgnored() const { return fCoverageIgnored; } 59 bool coverageIgnored() const { return fCoverageIgnored; }
59 60
60 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override; 61 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override;
61 SkSTArray<1, Geometry, true> fGeoData; 62 SkSTArray<1, Geometry, true> fGeoData;
62 63
63 SkMatrix fViewMatrix; 64 SkMatrix fViewMatrix;
64 GrColor fColor; 65 GrColor fColor;
65 int fQuadCount; 66 int fQuadCount;
66 bool fColorIgnored; 67 bool fColorIgnored;
67 bool fCoverageIgnored; 68 bool fCoverageIgnored;
68 bool fHasColors; 69 bool fHasColors;
69 }; 70 };
70 71
71 #endif 72 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrBWFillRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698