diff options
author | 2016-11-15 16:44:34 -0500 | |
---|---|---|
committer | 2016-11-16 15:38:11 +0000 | |
commit | d47067392848ba132d4e86ffbeebe2dcacda9534 (patch) | |
tree | 456bd4182524d55f19117d8e726bacca50059fa8 /src/gpu | |
parent | 988283c89458442f65d961f2746a9f271a39c31e (diff) |
make SkXfermode.h go away
This is step one:
- make SkXfermode useless to public clients
- everything they should need is in SkBlendMode.h
Step two:
- remove SkXfermode.h entirely (since skia core will already be using SkXfermodePriv.h)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4534
Change-Id: If2cea9f71df92430ed6644edb98dd306c5572cbc
Reviewed-on: https://skia-review.googlesource.com/4534
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/SkGrPriv.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrCustomXfermode.cpp | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrPorterDuffXferProcessor.cpp | 4 | ||||
-rw-r--r-- | src/gpu/glsl/GrGLSLBlend.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h index ecbe558c94..bd1d7155e6 100644 --- a/src/gpu/SkGrPriv.h +++ b/src/gpu/SkGrPriv.h @@ -12,7 +12,7 @@ #include "GrBlend.h" #include "SkImageInfo.h" #include "SkMatrix.h" -#include "SkXfermode.h" +#include "SkXfermodePriv.h" class GrCaps; class GrContext; diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index 3895f57f5d..8a54d4457a 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -384,8 +384,8 @@ void CustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI, GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory); sk_sp<GrXPFactory> CustomXPFactory::TestCreate(GrProcessorTestData* d) { - int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, - SkXfermode::kLastSeparableMode); + int mode = d->fRandom->nextRangeU((int)SkBlendMode::kLastCoeffMode + 1, + (int)SkBlendMode::kLastSeparableMode); return sk_sp<GrXPFactory>(new CustomXPFactory(static_cast<SkBlendMode>(mode))); } diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index d511fae45d..ff95dac723 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -227,7 +227,7 @@ GR_MAKE_BITFIELD_OPS(BlendFormula::Properties); * with and without an opaque input color. Optimization properties are deduced at compile time so we * can make runtime decisions quickly. RGB coverage is not supported. */ -static const BlendFormula gBlendTable[2][2][SkXfermode::kLastCoeffMode + 1] = { +static const BlendFormula gBlendTable[2][2][(int)SkBlendMode::kLastCoeffMode + 1] = { /*>> No coverage, input color unknown <<*/ {{ @@ -302,7 +302,7 @@ static const BlendFormula gBlendTable[2][2][SkXfermode::kLastCoeffMode + 1] = { /* screen */ COEFF_FORMULA( kOne_GrBlendCoeff, kISC_GrBlendCoeff), }}}; -static const BlendFormula gLCDBlendTable[SkXfermode::kLastCoeffMode + 1] = { +static const BlendFormula gLCDBlendTable[(int)SkBlendMode::kLastCoeffMode + 1] = { /* clear */ COVERAGE_SRC_COEFF_ZERO_FORMULA(BlendFormula::kCoverage_OutputType), /* src */ COVERAGE_FORMULA(BlendFormula::kCoverage_OutputType, kOne_GrBlendCoeff), /* dst */ NO_DST_WRITE_FORMULA, diff --git a/src/gpu/glsl/GrGLSLBlend.cpp b/src/gpu/glsl/GrGLSLBlend.cpp index 73a145b7c3..da73b6644b 100644 --- a/src/gpu/glsl/GrGLSLBlend.cpp +++ b/src/gpu/glsl/GrGLSLBlend.cpp @@ -4,8 +4,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #include "GrGLSLBlend.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" +#include "SkXfermodePriv.h" ////////////////////////////////////////////////////////////////////////////// // Advanced (non-coeff) blend helpers |