diff options
author | 2016-10-28 15:42:34 -0400 | |
---|---|---|
committer | 2016-10-28 20:06:17 +0000 | |
commit | 7d954ad797176afedb9262fdea4507d0fc60eb9d (patch) | |
tree | 27c6dc324f83877371d91a58beb21e4b00176a94 /tools/debugger/SkDebugCanvas.cpp | |
parent | 99e3f7d6fcb7b3b4340286455733a7de9eb4ef81 (diff) |
remove xfermode from public api
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tools/debugger/SkDebugCanvas.cpp')
-rw-r--r-- | tools/debugger/SkDebugCanvas.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index ee3427dff1..8bdaca1815 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp @@ -654,17 +654,27 @@ void SkDebugCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar } void SkDebugCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], - const SkPoint texCoords[4], SkXfermode* xmode, + const SkPoint texCoords[4], SK_XFERMODE_PARAM xmode, const SkPaint& paint) { - this->addDrawCommand(new SkDrawPatchCommand(cubics, colors, texCoords, xmode, paint)); +#ifdef SK_SUPPORT_LEGACY_XFERMODE_PARAM + SkBlendMode bmode = xmode ? xmode->blend() : SkBlendMode::kModulate; +#else + SkBlendMode bmode = xmode; +#endif + this->addDrawCommand(new SkDrawPatchCommand(cubics, colors, texCoords, bmode, paint)); } void SkDebugCanvas::onDrawVertices(VertexMode vmode, int vertexCount, const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], - SkXfermode*, const uint16_t indices[], int indexCount, + SK_XFERMODE_PARAM xmode, const uint16_t indices[], int indexCount, const SkPaint& paint) { +#ifdef SK_SUPPORT_LEGACY_XFERMODE_PARAM + SkBlendMode bmode = xmode ? xmode->blend() : SkBlendMode::kModulate; +#else + SkBlendMode bmode = xmode; +#endif this->addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, - texs, colors, nullptr, indices, indexCount, paint)); + texs, colors, bmode, indices, indexCount, paint)); } void SkDebugCanvas::willRestore() { |