From faba3715b8ddfaa0ce4df79bc8006e9bc7694e5b Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Thu, 3 Nov 2016 14:45:31 -0400 Subject: 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 Commit-Queue: Mike Reed --- src/gpu/SkGpuDevice.cpp | 14 ++++---------- src/gpu/SkGpuDevice.h | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'src/gpu') 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; -- cgit v1.2.3