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 GrDrawPathBatch_DEFINED | 8 #ifndef GrDrawPathBatch_DEFINED |
9 #define GrDrawPathBatch_DEFINED | 9 #define GrDrawPathBatch_DEFINED |
10 | 10 |
11 #include "GrDrawBatch.h" | 11 #include "GrDrawBatch.h" |
12 #include "GrGpu.h" | 12 #include "GrGpu.h" |
13 #include "GrPath.h" | 13 #include "GrPath.h" |
14 #include "GrPathRendering.h" | 14 #include "GrPathRendering.h" |
15 #include "GrPathProcessor.h" | 15 #include "GrPathProcessor.h" |
16 | 16 |
17 class GrDrawPathBatch final : public GrDrawBatch { | 17 class GrDrawPathBatch final : public GrDrawBatch { |
18 public: | 18 public: |
19 // This must return the concrete type because we install the stencil setting
s late :( | 19 // This must return the concrete type because we install the stencil setting
s late :( |
20 static GrDrawPathBatch* Create(const GrPathProcessor* primProc, const GrPath
* path) { | 20 static GrDrawPathBatch* Create(const GrPathProcessor* primProc, const GrPath
* path) { |
21 return SkNEW_ARGS(GrDrawPathBatch, (primProc, path)); | 21 return new GrDrawPathBatch(primProc, path); |
22 } | 22 } |
23 | 23 |
24 const char* name() const override { return "DrawPath"; } | 24 const char* name() const override { return "DrawPath"; } |
25 | 25 |
26 SkString dumpInfo() const override { | 26 SkString dumpInfo() const override { |
27 SkString string; | 27 SkString string; |
28 string.printf("PATH: 0x%p", fPath.get()); | 28 string.printf("PATH: 0x%p", fPath.get()); |
29 return string; | 29 return string; |
30 } | 30 } |
31 | 31 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 state->gpu()->pathRendering()->drawPath(args, fPath.get()); | 66 state->gpu()->pathRendering()->drawPath(args, fPath.get()); |
67 } | 67 } |
68 | 68 |
69 GrPendingProgramElement<const GrPathProcessor> fPrimitiveProcessor; | 69 GrPendingProgramElement<const GrPathProcessor> fPrimitiveProcessor; |
70 PathBatchTracker fWhatchamacallit; // TOD
O: delete this | 70 PathBatchTracker fWhatchamacallit; // TOD
O: delete this |
71 GrStencilSettings fStencilSettings; | 71 GrStencilSettings fStencilSettings; |
72 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; | 72 GrPendingIOResource<const GrPath, kRead_GrIOType> fPath; |
73 }; | 73 }; |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |