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

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

Issue 2127673002: Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@AAStrokeRect
Patch Set: update for instanced rendering Created 4 years, 5 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/GrTessellatingPathRenderer.cpp ('k') | src/gpu/effects/GrDashingEffect.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 GrTestBatch_DEFINED 8 #ifndef GrTestBatch_DEFINED
9 #define GrTestBatch_DEFINED 9 #define GrTestBatch_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 fOptimizations.fColorIgnored = !overrides.readsColor(); 35 fOptimizations.fColorIgnored = !overrides.readsColor();
36 fOptimizations.fUsesLocalCoords = overrides.readsLocalCoords(); 36 fOptimizations.fUsesLocalCoords = overrides.readsLocalCoords();
37 fOptimizations.fCoverageIgnored = !overrides.readsCoverage(); 37 fOptimizations.fCoverageIgnored = !overrides.readsCoverage();
38 } 38 }
39 39
40 protected: 40 protected:
41 GrTestBatch(uint32_t classID, const SkRect& bounds, GrColor color) 41 GrTestBatch(uint32_t classID, const SkRect& bounds, GrColor color)
42 : INHERITED(classID) 42 : INHERITED(classID)
43 , fColor(color) { 43 , fColor(color) {
44 this->setBounds(bounds); 44 // Choose some conservative values for aa bloat and zero area.
45 this->setBounds(bounds, HasAABloat::kYes, IsZeroArea::kYes);
45 } 46 }
46 47
47 struct Optimizations { 48 struct Optimizations {
48 bool fColorIgnored = false; 49 bool fColorIgnored = false;
49 bool fUsesLocalCoords = false; 50 bool fUsesLocalCoords = false;
50 bool fCoverageIgnored = false; 51 bool fCoverageIgnored = false;
51 }; 52 };
52 53
53 GrColor color() const { return fColor; } 54 GrColor color() const { return fColor; }
54 const Optimizations optimizations() const { return fOptimizations; } 55 const Optimizations optimizations() const { return fOptimizations; }
55 56
56 private: 57 private:
57 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override { 58 bool onCombineIfPossible(GrBatch* t, const GrCaps&) override {
58 return false; 59 return false;
59 } 60 }
60 61
61 GrColor fColor; 62 GrColor fColor;
62 Optimizations fOptimizations; 63 Optimizations fOptimizations;
63 64
64 typedef GrVertexBatch INHERITED; 65 typedef GrVertexBatch INHERITED;
65 }; 66 };
66 67
67 #endif 68 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTessellatingPathRenderer.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698