OLD | NEW |
---|---|
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 int numStencilBits, | 51 int numStencilBits, |
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) { |
robertphillips
2016/07/07 20:26:42
xtra ' ' ?
bsalomon
2016/07/07 23:40:57
Done.
| |
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 |
OLD | NEW |