diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkDraw.cpp | 2 | ||||
-rw-r--r-- | src/core/SkXfermode.cpp | 10 | ||||
-rw-r--r-- | src/effects/SkBlendImageFilter.cpp | 8 | ||||
-rw-r--r-- | src/effects/SkPorterDuff.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrSWMaskHelper.cpp | 2 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFGraphicState.cpp | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 6d8bfc5974..4b06b880de 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -2499,7 +2499,7 @@ void SkDraw::drawVertices(SkCanvas::VertexMode vmode, int count, SkASSERT(shader); bool releaseMode = false; if (NULL == xmode) { - xmode = SkXfermode::Create(SkXfermode::kMultiply_Mode); + xmode = SkXfermode::Create(SkXfermode::kModulate_Mode); releaseMode = true; } SkShader* compose = SkNEW_ARGS(SkComposeShader, diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index a248cda134..520ab876a6 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -182,8 +182,8 @@ static SkPMColor plus_modeproc(SkPMColor src, SkPMColor dst) { return SkPackARGB32(a, r, g, b); } -// kMultiply_Mode -static SkPMColor multiply_modeproc(SkPMColor src, SkPMColor dst) { +// kModulate_Mode +static SkPMColor modulate_modeproc(SkPMColor src, SkPMColor dst) { int a = SkAlphaMulAlpha(SkGetPackedA32(src), SkGetPackedA32(dst)); int r = SkAlphaMulAlpha(SkGetPackedR32(src), SkGetPackedR32(dst)); int g = SkAlphaMulAlpha(SkGetPackedG32(src), SkGetPackedG32(dst)); @@ -436,7 +436,7 @@ static const ProcCoeff gProcCoeffs[] = { { xor_modeproc, SkXfermode::kIDA_Coeff, SkXfermode::kISA_Coeff }, { plus_modeproc, SkXfermode::kOne_Coeff, SkXfermode::kOne_Coeff }, - { multiply_modeproc,SkXfermode::kZero_Coeff, SkXfermode::kSC_Coeff }, + { modulate_modeproc,SkXfermode::kZero_Coeff, SkXfermode::kSC_Coeff }, { screen_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, { overlay_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, { darken_modeproc, CANNOT_USE_COEFF, CANNOT_USE_COEFF }, @@ -771,7 +771,7 @@ void SkProcCoeffXfermode::toString(SkString* str) const { const char *gModeStrings[kLastMode+1] = { "Clear", "Src", "Dst", "SrcOver", "DstOver", "SrcIn", "DstIn", "SrcOut", "DstOut", "SrcATop", "DstATop", "Xor", "Plus", - "Multiply", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge", + "Modulate", "Screen", "Overlay", "Darken", "Lighten", "ColorDodge", "ColorBurn", "HardLight", "SoftLight", "Difference", "Exclusion" }; @@ -1234,7 +1234,7 @@ static const Proc16Rec gModeProcs16[] = { { NULL, NULL, NULL }, // XOR { NULL, NULL, NULL }, // plus - { NULL, NULL, NULL }, // multiply + { NULL, NULL, NULL }, // modulate { NULL, NULL, NULL }, // screen { NULL, NULL, NULL }, // overlay { darken_modeproc16_0, darken_modeproc16_255, NULL }, // darken diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp index 775eba6e8d..46f25648fa 100644 --- a/src/effects/SkBlendImageFilter.cpp +++ b/src/effects/SkBlendImageFilter.cpp @@ -24,8 +24,8 @@ SkXfermode::Mode modeToXfermode(SkBlendImageFilter::Mode mode) switch (mode) { case SkBlendImageFilter::kNormal_Mode: return SkXfermode::kSrcOver_Mode; - case SkBlendImageFilter::kMultiply_Mode: - return SkXfermode::kMultiply_Mode; + case SkBlendImageFilter::kModulate_Mode: + return SkXfermode::kModulate_Mode; case SkBlendImageFilter::kScreen_Mode: return SkXfermode::kScreen_Mode; case SkBlendImageFilter::kDarken_Mode: @@ -100,7 +100,7 @@ bool SkBlendImageFilter::onFilterImage(Proxy* proxy, // FEBlend's multiply mode is (1 - Sa) * Da + (1 - Da) * Sc + Sc * Dc // Skia's is just Sc * Dc. So we use a custom proc to implement FEBlend's // version. - if (fMode == SkBlendImageFilter::kMultiply_Mode) { + if (fMode == SkBlendImageFilter::kModulate_Mode) { paint.setXfermode(new SkProcXfermode(multiply_proc))->unref(); } else { paint.setXfermodeMode(modeToXfermode(fMode)); @@ -283,7 +283,7 @@ void GrGLBlendEffect::emitCode(GrGLShaderBuilder* builder, case SkBlendImageFilter::kNormal_Mode: code->appendf("\t\t%s.rgb = (1.0 - %s.a) * %s.rgb + %s.rgb;\n", outputColor, fgColor, bgColor, fgColor); break; - case SkBlendImageFilter::kMultiply_Mode: + case SkBlendImageFilter::kModulate_Mode: code->appendf("\t\t%s.rgb = (1.0 - %s.a) * %s.rgb + (1.0 - %s.a) * %s.rgb + %s.rgb * %s.rgb;\n", outputColor, fgColor, bgColor, bgColor, fgColor, fgColor, bgColor); break; case SkBlendImageFilter::kScreen_Mode: diff --git a/src/effects/SkPorterDuff.cpp b/src/effects/SkPorterDuff.cpp index 4dc9783d2b..816ddae04b 100644 --- a/src/effects/SkPorterDuff.cpp +++ b/src/effects/SkPorterDuff.cpp @@ -36,7 +36,7 @@ static const struct Pair { MAKE_PAIR(Xor), MAKE_PAIR(Darken), MAKE_PAIR(Lighten), - MAKE_PAIR(Multiply), + MAKE_PAIR(Modulate), MAKE_PAIR(Screen), { SkPorterDuff::kAdd_Mode, SkXfermode::kPlus_Mode }, #ifdef SK_BUILD_FOR_ANDROID diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp index 50fcc2be19..c05209137c 100644 --- a/src/gpu/GrSWMaskHelper.cpp +++ b/src/gpu/GrSWMaskHelper.cpp @@ -22,7 +22,7 @@ SkXfermode::Mode op_to_mode(SkRegion::Op op) { static const SkXfermode::Mode modeMap[] = { SkXfermode::kDstOut_Mode, // kDifference_Op - SkXfermode::kMultiply_Mode, // kIntersect_Op + SkXfermode::kModulate_Mode, // kIntersect_Op SkXfermode::kSrcOver_Mode, // kUnion_Op SkXfermode::kXor_Mode, // kXOR_Op SkXfermode::kClear_Mode, // kReverseDifference_Op diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index b1170d373f..18f66b5edf 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1629,7 +1629,7 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, } if (NULL != xmode && NULL != texs && NULL != colors) { - if (!SkXfermode::IsMode(xmode, SkXfermode::kMultiply_Mode)) { + if (!SkXfermode::IsMode(xmode, SkXfermode::kModulate_Mode)) { SkDebugf("Unsupported vertex-color/texture xfer mode.\n"); #if 0 return diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp index c326b3b533..ea8621fd40 100644 --- a/src/pdf/SkPDFGraphicState.cpp +++ b/src/pdf/SkPDFGraphicState.cpp @@ -16,7 +16,7 @@ static const char* blend_mode_from_xfermode(SkXfermode::Mode mode) { switch (mode) { case SkXfermode::kSrcOver_Mode: return "Normal"; - case SkXfermode::kMultiply_Mode: return "Multiply"; + case SkXfermode::kModulate_Mode: return "Multiply"; case SkXfermode::kScreen_Mode: return "Screen"; case SkXfermode::kOverlay_Mode: return "Overlay"; case SkXfermode::kDarken_Mode: return "Darken"; |