OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrPathProcessor_DEFINED | 8 #ifndef GrPathProcessor_DEFINED |
9 #define GrPathProcessor_DEFINED | 9 #define GrPathProcessor_DEFINED |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override
; | 32 void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const override
; |
33 | 33 |
34 bool canMakeEqual(const GrBatchTracker& mine, | 34 bool canMakeEqual(const GrBatchTracker& mine, |
35 const GrPrimitiveProcessor& that, | 35 const GrPrimitiveProcessor& that, |
36 const GrBatchTracker& theirs) const override; | 36 const GrBatchTracker& theirs) const override; |
37 | 37 |
38 const char* name() const override { return "PathProcessor"; } | 38 const char* name() const override { return "PathProcessor"; } |
39 | 39 |
| 40 const SkMatrix& viewMatrix() const { return fViewMatrix; } |
40 GrColor color() const { return fColor; } | 41 GrColor color() const { return fColor; } |
41 | 42 |
42 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; | 43 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; |
43 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; | 44 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; |
44 | 45 |
45 bool willUseGeoShader() const override { return false; } | 46 bool willUseGeoShader() const override { return false; } |
46 | 47 |
47 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 48 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
48 const GrGLSLCaps& caps, | 49 const GrGLSLCaps& caps, |
49 GrProcessorKeyBuilder* b) const override; | 50 GrProcessorKeyBuilder* b) const override; |
50 | 51 |
51 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 52 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
52 const GrGLSLCaps& caps) con
st override; | 53 const GrGLSLCaps& caps) con
st override; |
53 | 54 |
54 protected: | 55 private: |
55 GrPathProcessor(GrColor color, const SkMatrix& viewMatrix, const SkMatrix& l
ocalMatrix); | 56 GrPathProcessor(GrColor color, const SkMatrix& viewMatrix, const SkMatrix& l
ocalMatrix); |
56 | |
57 private: | |
58 bool hasExplicitLocalCoords() const override { return false; } | 57 bool hasExplicitLocalCoords() const override { return false; } |
59 | 58 |
| 59 const SkMatrix fViewMatrix; |
60 GrColor fColor; | 60 GrColor fColor; |
61 | 61 |
62 typedef GrPrimitiveProcessor INHERITED; | 62 typedef GrPrimitiveProcessor INHERITED; |
63 }; | 63 }; |
64 | 64 |
65 #endif | 65 #endif |
OLD | NEW |