OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "effects/GrSingleTextureEffect.h" | 8 #include "effects/GrSingleTextureEffect.h" |
9 | 9 |
10 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 10 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
| 11 sk_sp<GrColorSpaceXform> colorSpace
Xform, |
11 const SkMatrix& m, | 12 const SkMatrix& m, |
12 GrCoordSet coordSet) | 13 GrCoordSet coordSet) |
13 : fCoordTransform(coordSet, m, texture, GrTextureParams::kNone_FilterMode) | 14 : fCoordTransform(coordSet, m, texture, GrTextureParams::kNone_FilterMode) |
14 , fTextureAccess(texture) { | 15 , fTextureAccess(texture) |
| 16 , fColorSpaceXform(std::move(colorSpaceXform)) { |
15 this->addCoordTransform(&fCoordTransform); | 17 this->addCoordTransform(&fCoordTransform); |
16 this->addTextureAccess(&fTextureAccess); | 18 this->addTextureAccess(&fTextureAccess); |
17 } | 19 } |
18 | 20 |
19 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 21 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
| 22 sk_sp<GrColorSpaceXform> colorSpace
Xform, |
20 const SkMatrix& m, | 23 const SkMatrix& m, |
21 GrTextureParams::FilterMode filterM
ode, | 24 GrTextureParams::FilterMode filterM
ode, |
22 GrCoordSet coordSet) | 25 GrCoordSet coordSet) |
23 : fCoordTransform(coordSet, m, texture, filterMode) | 26 : fCoordTransform(coordSet, m, texture, filterMode) |
24 , fTextureAccess(texture, filterMode) { | 27 , fTextureAccess(texture, filterMode) |
| 28 , fColorSpaceXform(std::move(colorSpaceXform)) { |
25 this->addCoordTransform(&fCoordTransform); | 29 this->addCoordTransform(&fCoordTransform); |
26 this->addTextureAccess(&fTextureAccess); | 30 this->addTextureAccess(&fTextureAccess); |
27 } | 31 } |
28 | 32 |
29 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, | 33 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture, |
| 34 sk_sp<GrColorSpaceXform> colorSpace
Xform, |
30 const SkMatrix& m, | 35 const SkMatrix& m, |
31 const GrTextureParams& params, | 36 const GrTextureParams& params, |
32 GrCoordSet coordSet) | 37 GrCoordSet coordSet) |
33 : fCoordTransform(coordSet, m, texture, params.filterMode()) | 38 : fCoordTransform(coordSet, m, texture, params.filterMode()) |
34 , fTextureAccess(texture, params) { | 39 , fTextureAccess(texture, params) |
| 40 , fColorSpaceXform(std::move(colorSpaceXform)) { |
35 this->addCoordTransform(&fCoordTransform); | 41 this->addCoordTransform(&fCoordTransform); |
36 this->addTextureAccess(&fTextureAccess); | 42 this->addTextureAccess(&fTextureAccess); |
37 } | 43 } |
38 | 44 |
39 GrSingleTextureEffect::~GrSingleTextureEffect() { | 45 GrSingleTextureEffect::~GrSingleTextureEffect() { |
40 } | 46 } |
OLD | NEW |