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 |
11 #include "GrBatch.h" | 11 #include "GrBatch.h" |
12 #include "GrBatchFlushState.h" | 12 #include "GrBatchFlushState.h" |
13 #include "GrGpu.h" | 13 #include "GrGpu.h" |
14 #include "GrPath.h" | 14 #include "GrPath.h" |
15 #include "GrPathRendering.h" | 15 #include "GrPathRendering.h" |
16 #include "GrRenderTarget.h" | 16 #include "GrRenderTarget.h" |
17 | 17 |
18 class GrStencilPathBatch final : public GrBatch { | 18 class GrStencilPathBatch final : public GrBatch { |
19 public: | 19 public: |
20 static GrBatch* Create(const SkMatrix& viewMatrix, | 20 static GrBatch* Create(const SkMatrix& viewMatrix, |
21 bool useHWAA, | 21 bool useHWAA, |
22 const GrStencilSettings& stencil, | 22 const GrStencilSettings& stencil, |
23 const GrScissorState& scissor, | 23 const GrScissorState& scissor, |
24 GrRenderTarget* renderTarget, | 24 GrRenderTarget* renderTarget, |
25 const GrPath* path) { | 25 const GrPath* path) { |
26 return SkNEW_ARGS(GrStencilPathBatch, (viewMatrix, useHWAA, stencil, sci
ssor, renderTarget, | 26 return new GrStencilPathBatch(viewMatrix, useHWAA, stencil, scissor, ren
derTarget, path); |
27 path)); | |
28 } | 27 } |
29 | 28 |
30 const char* name() const override { return "StencilPath"; } | 29 const char* name() const override { return "StencilPath"; } |
31 | 30 |
32 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>getUniqueID(); } | 31 uint32_t renderTargetUniqueID() const override { return fRenderTarget.get()-
>getUniqueID(); } |
33 | 32 |
34 SkString dumpInfo() const override { | 33 SkString dumpInfo() const override { |
35 SkString string; | 34 SkString string; |
36 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); | 35 string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA); |
37 return string; | 36 return string; |
(...skipping 27 matching lines...) Expand all Loading... |
65 | 64 |
66 SkMatrix fViewMatrix; | 65 SkMatrix fViewMatrix; |
67 bool fUseHWAA; | 66 bool fUseHWAA; |
68 GrStencilSettings fStencil; | 67 GrStencilSettings fStencil; |
69 GrScissorState fScissor; | 68 GrScissorState fScissor; |
70 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; | 69 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; |
71 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; | 70 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
72 }; | 71 }; |
73 | 72 |
74 #endif | 73 #endif |
OLD | NEW |