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

Side by Side Diff: src/gpu/batches/GrStencilPathBatch.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/GrPLSPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.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 GrStencilPathBatch_DEFINED 8 #ifndef GrStencilPathBatch_DEFINED
9 #define GrStencilPathBatch_DEFINED 9 #define GrStencilPathBatch_DEFINED
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const GrScissorState& scissor, 52 const GrScissorState& scissor,
53 GrRenderTarget* renderTarget, 53 GrRenderTarget* renderTarget,
54 const GrPath* path) 54 const GrPath* path)
55 : INHERITED(ClassID()) 55 : INHERITED(ClassID())
56 , fViewMatrix(viewMatrix) 56 , fViewMatrix(viewMatrix)
57 , fUseHWAA(useHWAA) 57 , fUseHWAA(useHWAA)
58 , fStencil(GrPathRendering::GetStencilPassSettings(fillType), hasStencilClip , numStencilBits) 58 , fStencil(GrPathRendering::GetStencilPassSettings(fillType), hasStencilClip , numStencilBits)
59 , fScissor(scissor) 59 , fScissor(scissor)
60 , fRenderTarget(renderTarget) 60 , fRenderTarget(renderTarget)
61 , fPath(path) { 61 , fPath(path) {
62 fBounds = path->getBounds(); 62 this->setBounds(path->getBounds(), HasAABloat::kNo, IsZeroArea::kNo);
63 } 63 }
64 64
65 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; } 65 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return f alse; }
66 66
67 void onPrepare(GrBatchFlushState*) override {} 67 void onPrepare(GrBatchFlushState*) override {}
68 68
69 void onDraw(GrBatchFlushState* state) override { 69 void onDraw(GrBatchFlushState* state) override {
70 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix, 70 GrPathRendering::StencilPathArgs args(fUseHWAA, fRenderTarget.get(), &fV iewMatrix,
71 &fScissor, &fStencil); 71 &fScissor, &fStencil);
72 state->gpu()->pathRendering()->stencilPath(args, fPath.get()); 72 state->gpu()->pathRendering()->stencilPath(args, fPath.get());
73 } 73 }
74 74
75 SkMatrix fViewMatrix; 75 SkMatrix fViewMatrix;
76 bool fUseHWAA; 76 bool fUseHWAA;
77 GrStencilSettings fStencil; 77 GrStencilSettings fStencil;
78 GrScissorState fScissor; 78 GrScissorState fScissor;
79 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 79 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
80 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; 80 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath;
81 81
82 typedef GrBatch INHERITED; 82 typedef GrBatch INHERITED;
83 }; 83 };
84 84
85 #endif 85 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrPLSPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698