aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-11-03 14:45:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-03 19:54:08 +0000
commitfaba3715b8ddfaa0ce4df79bc8006e9bc7694e5b (patch)
tree7d12df48b54ebdb69209e784872831f32abbe30f /src/gpu
parent8b1fb741f196b78479b9d5bb2b33875aaa9709bb (diff)
remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4384 Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0 Reviewed-on: https://skia-review.googlesource.com/4384 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp14
-rw-r--r--src/gpu/SkGpuDevice.h4
2 files changed, 6 insertions, 12 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index a65d6e8d89..b8a520fe2c 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1564,7 +1564,7 @@ static const GrPrimitiveType gVertexMode2PrimitiveType[] = {
void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
int vertexCount, const SkPoint vertices[],
const SkPoint texs[], const SkColor colors[],
- SK_XFERMODE_PARAM xmode,
+ SkBlendMode bmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
@@ -1644,15 +1644,9 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
GrPaint grPaint;
if (texs && paint.getShader()) {
if (colors) {
- // When there are texs and colors the shader and colors are combined using xmode. A null
- // xmode is defined to mean modulate.
-#ifdef SK_SUPPORT_LEGACY_XFERMODE_PARAM
- SkBlendMode colorMode = xmode ? xmode->blend() : SkBlendMode::kModulate;
-#else
- SkBlendMode colorMode = xmode;
-#endif
+ // When there are texs and colors the shader and colors are combined using bmode.
if (!SkPaintToGrPaintWithXfermode(this->context(), fRenderTargetContext.get(), paint,
- *draw.fMatrix, colorMode, false, &grPaint)) {
+ *draw.fMatrix, bmode, false, &grPaint)) {
return;
}
} else {
@@ -1695,7 +1689,7 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
void SkGpuDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkRSXform xform[],
const SkRect texRect[], const SkColor colors[], int count,
- SK_XFERMODE_MODE_PARAM mode, const SkPaint& paint) {
+ SkBlendMode mode, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
if (paint.isAntiAlias()) {
this->INHERITED::drawAtlas(draw, atlas, xform, texRect, colors, count, mode, paint);
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index 77afda77ef..bed8d896c4 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -92,10 +92,10 @@ public:
void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkScalar y,
const SkPaint& paint, SkDrawFilter* drawFilter) override;
void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, const SkPoint verts[],
- const SkPoint texs[], const SkColor colors[], SK_XFERMODE_PARAM,
+ const SkPoint texs[], const SkColor colors[], SkBlendMode,
const uint16_t indices[], int indexCount, const SkPaint&) override;
void drawAtlas(const SkDraw&, const SkImage* atlas, const SkRSXform[], const SkRect[],
- const SkColor[], int count, SK_XFERMODE_MODE_PARAM, const SkPaint&) override;
+ const SkColor[], int count, SkBlendMode, const SkPaint&) override;
void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override;
void drawImage(const SkDraw&, const SkImage*, SkScalar x, SkScalar y, const SkPaint&) override;