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

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

Issue 2114993002: GrFP can express distance vector field req., program builder declares variable for it (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-bevel-api-change
Patch Set: Fixed GrPaint unintialized bool Created 4 years, 4 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 | « src/gpu/GrFragmentProcessor.cpp ('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 * 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 , fAllowSRGBInputs(false)
19 , fUsesDistanceVectorField(false)
19 , fColor(GrColor4f::FromGrColor(GrColor_WHITE)) {} 20 , fColor(GrColor4f::FromGrColor(GrColor_WHITE)) {}
20 21
21 void GrPaint::setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCovera ge) { 22 void GrPaint::setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCovera ge) {
22 fXPFactory = GrCoverageSetOpXPFactory::Make(regionOp, invertCoverage); 23 fXPFactory = GrCoverageSetOpXPFactory::Make(regionOp, invertCoverage);
23 } 24 }
24 25
25 void GrPaint::addColorTextureProcessor(GrTexture* texture, 26 void GrPaint::addColorTextureProcessor(GrTexture* texture,
26 sk_sp<GrColorSpaceXform> colorSpaceXform, 27 sk_sp<GrColorSpaceXform> colorSpaceXform,
27 const SkMatrix& matrix) { 28 const SkMatrix& matrix) {
28 this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(texture, 29 this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(texture,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 colorProcInfo.isOpaq ue(), 66 colorProcInfo.isOpaq ue(),
66 &blendedColor); 67 &blendedColor);
67 } 68 }
68 69
69 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { 70 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) {
70 *color = blendedColor.fKnownColor; 71 *color = blendedColor.fKnownColor;
71 return true; 72 return true;
72 } 73 }
73 return false; 74 return false;
74 } 75 }
OLDNEW
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698