| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const GrFragmentProcessor* addCoverageFragmentProcessor(const GrFragmentProc
essor* fp) { | 82 const GrFragmentProcessor* addCoverageFragmentProcessor(const GrFragmentProc
essor* fp) { |
| 83 SkASSERT(fp); | 83 SkASSERT(fp); |
| 84 fCoverageFragmentProcessors.push_back(SkRef(fp)); | 84 fCoverageFragmentProcessors.push_back(SkRef(fp)); |
| 85 return fp; | 85 return fp; |
| 86 } | 86 } |
| 87 | 87 |
| 88 /** | 88 /** |
| 89 * Helpers for adding color or coverage effects that sample a texture. The m
atrix is applied | 89 * Helpers for adding color or coverage effects that sample a texture. The m
atrix is applied |
| 90 * to the src space position to compute texture coordinates. | 90 * to the src space position to compute texture coordinates. |
| 91 */ | 91 */ |
| 92 void addColorTextureProcessor(GrTexture*, const SkMatrix&); | 92 void addColorTextureProcessor(GrTexture*, const SkMatrix&, GrRenderTarget* d
st); |
| 93 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&); | 93 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, GrRenderTarget
* dst); |
| 94 void addColorTextureProcessor(GrTexture*, const SkMatrix&, const GrTexturePa
rams&); | 94 void addColorTextureProcessor(GrTexture*, const SkMatrix&, const GrTexturePa
rams&, GrRenderTarget* dst); |
| 95 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur
eParams&); | 95 void addCoverageTextureProcessor(GrTexture*, const SkMatrix&, const GrTextur
eParams&, GrRenderTarget* dst); |
| 96 | 96 |
| 97 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou
nt(); } | 97 int numColorFragmentProcessors() const { return fColorFragmentProcessors.cou
nt(); } |
| 98 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso
rs.count(); } | 98 int numCoverageFragmentProcessors() const { return fCoverageFragmentProcesso
rs.count(); } |
| 99 int numTotalFragmentProcessors() const { return this->numColorFragmentProces
sors() + | 99 int numTotalFragmentProcessors() const { return this->numColorFragmentProces
sors() + |
| 100 this->numCoverageFragmentProcessor
s(); } | 100 this->numCoverageFragmentProcessor
s(); } |
| 101 | 101 |
| 102 const GrXPFactory* getXPFactory() const { | 102 const GrXPFactory* getXPFactory() const { |
| 103 if (!fXPFactory) { | 103 if (!fXPFactory) { |
| 104 fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode
)); | 104 fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode
)); |
| 105 } | 105 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 155 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
| 156 SkSTArray<4, const GrFragmentProcessor*, true> fColorFragmentProcessors; | 156 SkSTArray<4, const GrFragmentProcessor*, true> fColorFragmentProcessors; |
| 157 SkSTArray<2, const GrFragmentProcessor*, true> fCoverageFragmentProcessors; | 157 SkSTArray<2, const GrFragmentProcessor*, true> fCoverageFragmentProcessors; |
| 158 | 158 |
| 159 bool fAntiAlias; | 159 bool fAntiAlias; |
| 160 | 160 |
| 161 GrColor fColor; | 161 GrColor fColor; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 #endif | 164 #endif |
| OLD | NEW |