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 15 matching lines...) Expand all Loading... |
26 int numStencilBits, | 26 int numStencilBits, |
27 const GrScissorState& scissor, | 27 const GrScissorState& scissor, |
28 GrRenderTarget* renderTarget, | 28 GrRenderTarget* renderTarget, |
29 const GrPath* path) { | 29 const GrPath* path) { |
30 return new GrStencilPathBatch(viewMatrix, useHWAA, fillType, hasStencilC
lip, | 30 return new GrStencilPathBatch(viewMatrix, useHWAA, fillType, hasStencilC
lip, |
31 numStencilBits, scissor, renderTarget, pat
h); | 31 numStencilBits, scissor, renderTarget, pat
h); |
32 } | 32 } |
33 | 33 |
34 const char* name() const override { return "StencilPath"; } | 34 const char* name() const override { return "StencilPath"; } |
35 | 35 |
36 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>getUniqueID(); } | 36 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>uniqueID(); } |
37 GrRenderTarget* renderTarget() const override { return fRenderTarget.get();
} | 37 GrRenderTarget* renderTarget() const override { return fRenderTarget.get();
} |
38 | 38 |
39 SkString dumpInfo() const override { | 39 SkString dumpInfo() const override { |
40 SkString string; | 40 SkString string; |
41 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); | 41 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); |
42 string.append(INHERITED::dumpInfo()); | 42 string.append(INHERITED::dumpInfo()); |
43 return string; | 43 return string; |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
(...skipping 29 matching lines...) Expand all Loading... |
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 |