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

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

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "GrPaint.h" 8 #include "GrPaint.h"
9 9
10 #include "GrProcOptInfo.h" 10 #include "GrProcOptInfo.h"
11 #include "effects/GrCoverageSetOpXP.h" 11 #include "effects/GrCoverageSetOpXP.h"
12 #include "effects/GrPorterDuffXferProcessor.h" 12 #include "effects/GrPorterDuffXferProcessor.h"
13 #include "effects/GrSimpleTextureEffect.h" 13 #include "effects/GrSimpleTextureEffect.h"
14 14
15 GrPaint::GrPaint() 15 GrPaint::GrPaint()
16 : fAntiAlias(false) 16 : fAntiAlias(false)
17 , fDisableOutputConversionToSRGB(false) 17 , fDisableOutputConversionToSRGB(false)
18 , fAllowSRGBInputs(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

Powered by Google App Engine
This is Rietveld 408576698