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

Side by Side Diff: tests/PrimitiveProcessorTest.cpp

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/instanced/InstancedRendering.cpp ('k') | no next file » | 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 2016 Google Inc. 2 * Copyright 2016 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 // This is a GPU-backend specific test. It relies on static intializers to work 8 // This is a GPU-backend specific test. It relies on static intializers to work
9 9
10 #include "SkTypes.h" 10 #include "SkTypes.h"
(...skipping 23 matching lines...) Expand all
34 GrBatchToXPOverrides* overrides) const ove rride { 34 GrBatchToXPOverrides* overrides) const ove rride {
35 color->setUnknownFourComponents(); 35 color->setUnknownFourComponents();
36 coverage->setUnknownSingleComponent(); 36 coverage->setUnknownSingleComponent();
37 } 37 }
38 38
39 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {} 39 void initBatchTracker(const GrXPOverridesForBatch& overrides) override {}
40 40
41 Batch(int numAttribs) 41 Batch(int numAttribs)
42 : INHERITED(ClassID()) 42 : INHERITED(ClassID())
43 , fNumAttribs(numAttribs) { 43 , fNumAttribs(numAttribs) {
44 this->setBounds(SkRect::MakeWH(1.f, 1.f)); 44 this->setBounds(SkRect::MakeWH(1.f, 1.f), HasAABloat::kNo, IsZeroArea::k No);
45 } 45 }
46 46
47 private: 47 private:
48 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return false; } 48 bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return false; }
49 void onPrepareDraws(Target* target) const override { 49 void onPrepareDraws(Target* target) const override {
50 class GP : public GrGeometryProcessor { 50 class GP : public GrGeometryProcessor {
51 public: 51 public:
52 GP(int numAttribs) { 52 GP(int numAttribs) {
53 this->initClassID<GP>(); 53 this->initClassID<GP>();
54 SkASSERT(numAttribs > 1); 54 SkASSERT(numAttribs > 1);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // This one should fail. 135 // This one should fail.
136 batch.reset(new Batch(attribCnt+1)); 136 batch.reset(new Batch(attribCnt+1));
137 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch); 137 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
138 context->flush(); 138 context->flush();
139 #if GR_GPU_STATS 139 #if GR_GPU_STATS
140 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); 140 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
141 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ; 141 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ;
142 #endif 142 #endif
143 } 143 }
144 #endif 144 #endif
OLDNEW
« no previous file with comments | « src/gpu/instanced/InstancedRendering.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698