| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef GrPaint_DEFINED | 10 #ifndef GrPaint_DEFINED |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 */ | 108 */ |
| 109 void addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor> fp) { | 109 void addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor> fp) { |
| 110 SkASSERT(fp); | 110 SkASSERT(fp); |
| 111 fCoverageFragmentProcessors.push_back(std::move(fp)); | 111 fCoverageFragmentProcessors.push_back(std::move(fp)); |
| 112 } | 112 } |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * Helpers for adding color or coverage effects that sample a texture. The m
atrix is applied | 115 * Helpers for adding color or coverage effects that sample a texture. The m
atrix is applied |
| 116 * to the src space position to compute texture coordinates. | 116 * to the src space position to compute texture coordinates. |
| 117 */ | 117 */ |
| 118 void addColorTextureProcessor(GrTexture*, const SkMatrix&); | 118 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk
Matrix&); |
| 119 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&); | 119 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&); |
| 120 void addColorTextureProcessor(GrTexture*, const SkMatrix&, const GrTexturePa
rams&); | 120 void addColorTextureProcessor(GrTexture*, sk_sp<GrColorSpaceXform>, const Sk
Matrix&, |
| 121 const GrTextureParams&); |
| 121 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur
eParams&); | 122 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur
eParams&); |
| 122 | 123 |
| 123 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou
nt(); } | 124 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou
nt(); } |
| 124 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso
rs.count(); } | 125 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso
rs.count(); } |
| 125 int numTotalFragmentProcessors() const { return this->numColorFragmentProces
sors() + | 126 int numTotalFragmentProcessors() const { return this->numColorFragmentProces
sors() + |
| 126 this->numCoverageFragmentProcessor
s(); } | 127 this->numCoverageFragmentProcessor
s(); } |
| 127 | 128 |
| 128 GrXPFactory* getXPFactory() const { | 129 GrXPFactory* getXPFactory() const { |
| 129 return fXPFactory.get(); | 130 return fXPFactory.get(); |
| 130 } | 131 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 SkSTArray<2, sk_sp<GrFragmentProcessor>> fCoverageFragmentProcessors; | 165 SkSTArray<2, sk_sp<GrFragmentProcessor>> fCoverageFragmentProcessors; |
| 165 | 166 |
| 166 bool fAntiAlias; | 167 bool fAntiAlias; |
| 167 bool fDisableOutputConversionToSRGB; | 168 bool fDisableOutputConversionToSRGB; |
| 168 bool fAllowSRGBInputs; | 169 bool fAllowSRGBInputs; |
| 169 | 170 |
| 170 GrColor4f fColor; | 171 GrColor4f fColor; |
| 171 }; | 172 }; |
| 172 | 173 |
| 173 #endif | 174 #endif |
| OLD | NEW |