Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/gpu/GrPaint.cpp

Issue 1830303002: Require sRGB write control for sRGB support. Add flag to GrPaint to suppress linear -> sRGB convers… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added comment to srgbSupport() Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698