OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "GrPaint.h" | 9 #include "GrPaint.h" |
10 | 10 |
11 #include "GrProcOptInfo.h" | 11 #include "GrProcOptInfo.h" |
12 #include "effects/GrCoverageSetOpXP.h" | 12 #include "effects/GrCoverageSetOpXP.h" |
13 #include "effects/GrPorterDuffXferProcessor.h" | 13 #include "effects/GrPorterDuffXferProcessor.h" |
14 #include "effects/GrSimpleTextureEffect.h" | 14 #include "effects/GrSimpleTextureEffect.h" |
15 | 15 |
16 GrPaint::GrPaint() | 16 GrPaint::GrPaint() |
17 : fAntiAlias(false) | 17 : fAntiAlias(false) |
| 18 , fDisableOutputConversionToSRGB(false) |
18 , fColor(GrColor_WHITE) {} | 19 , fColor(GrColor_WHITE) {} |
19 | 20 |
20 void GrPaint::setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCovera
ge) { | 21 void GrPaint::setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCovera
ge) { |
21 fXPFactory.reset(GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage))
; | 22 fXPFactory.reset(GrCoverageSetOpXPFactory::Create(regionOp, invertCoverage))
; |
22 } | 23 } |
23 | 24 |
24 void GrPaint::addColorTextureProcessor(GrTexture* texture, const SkMatrix& matri
x) { | 25 void GrPaint::addColorTextureProcessor(GrTexture* texture, const SkMatrix& matri
x) { |
25 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, matri
x))->unref(); | 26 this->addColorFragmentProcessor(GrSimpleTextureEffect::Create(texture, matri
x))->unref(); |
26 } | 27 } |
27 | 28 |
(...skipping 30 matching lines...) Expand all Loading... |
58 colorProcInfo.isOpaq
ue(), | 59 colorProcInfo.isOpaq
ue(), |
59 &blendedColor); | 60 &blendedColor); |
60 } | 61 } |
61 | 62 |
62 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { | 63 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { |
63 *color = blendedColor.fKnownColor; | 64 *color = blendedColor.fKnownColor; |
64 return true; | 65 return true; |
65 } | 66 } |
66 return false; | 67 return false; |
67 } | 68 } |
OLD | NEW |