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>
diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h
index ecbe558..bd1d715 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 3895f57..8a54d44 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -384,8 +384,8 @@
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 d511fae..ff95dac 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -227,7 +227,7 @@
* 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 @@
/* 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 73a145b..da73b66 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