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

Unified Diff: src/effects/gradients/SkGradientShader.cpp

Issue 247433002: Use GradFlags for gradient Flags in SkGradientShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShader.cpp
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 957b0b232c1d244cec91f38dd5d08dd2b5ba4d95..2e92076b3add195c08158967c451a6e8b324dc40 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -19,7 +19,7 @@ SkGradientShaderBase::SkGradientShaderBase(const Descriptor& desc) {
fMapper = desc.fMapper;
SkSafeRef(fMapper);
- fGradFlags = SkToU8(desc.fFlags);
+ fGradFlags = SkToU8(desc.fGradFlags);
SkASSERT((unsigned)desc.fTileMode < SkShader::kTileModeCount);
SkASSERT(SkShader::kTileModeCount == SK_ARRAY_COUNT(gTileProcs));
@@ -762,12 +762,12 @@ static void desc_init(SkGradientShaderBase::Descriptor* desc,
const SkScalar pos[], int colorCount,
SkShader::TileMode mode,
SkUnitMapper* mapper, uint32_t flags) {
- desc->fColors = colors;
- desc->fPos = pos;
- desc->fCount = colorCount;
- desc->fTileMode = mode;
- desc->fMapper = mapper;
- desc->fFlags = flags;
+ desc->fColors = colors;
+ desc->fPos = pos;
+ desc->fCount = colorCount;
+ desc->fTileMode = mode;
+ desc->fMapper = mapper;
+ desc->fGradFlags = flags;
}
SkShader* SkGradientShader::CreateLinear(const SkPoint pts[2],
@@ -1083,7 +1083,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx,
SkGradientShaderBase::kThree_GpuColorType == fColorType) {
fRow = -1;
- if (SkGradientShader::kInterpolateColorsInPremul_Flag & shader.getFlags()) {
+ if (SkGradientShader::kInterpolateColorsInPremul_Flag & shader.getGradFlags()) {
fPremulType = kBeforeInterp_PremulType;
} else {
fPremulType = kAfterInterp_PremulType;
« no previous file with comments | « no previous file | src/effects/gradients/SkGradientShaderPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698