From 82e3553b562715d01f074a152a19fb59f084fdae Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 18 Dec 2020 17:44:59 +0900 Subject: [PATCH] common sw_engine: fix build break. some wrong merge conflicts left. resolve them. --- inc/thorvg.h | 2 +- src/lib/sw_engine/tvgSwRenderer.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/inc/thorvg.h b/inc/thorvg.h index 38ad4723..0a9d47b2 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -57,7 +57,7 @@ enum class TVG_EXPORT StrokeCap { Square = 0, Round, Butt }; enum class TVG_EXPORT StrokeJoin { Bevel = 0, Round, Miter }; enum class TVG_EXPORT FillSpread { Pad = 0, Reflect, Repeat }; enum class TVG_EXPORT FillRule { Winding = 0, EvenOdd }; -enum class TVG_EXPORT CompositeMethod { None = 0, ClipPath, AlphaMask, InvAlphaMask }; +enum class TVG_EXPORT CompositeMethod { None = 0, ClipPath, AlphaMask }; enum class TVG_EXPORT CanvasEngine { Sw = (1 << 1), Gl = (1 << 2)}; diff --git a/src/lib/sw_engine/tvgSwRenderer.cpp b/src/lib/sw_engine/tvgSwRenderer.cpp index 17a334ca..6b234fdf 100644 --- a/src/lib/sw_engine/tvgSwRenderer.cpp +++ b/src/lib/sw_engine/tvgSwRenderer.cpp @@ -133,8 +133,8 @@ struct SwShapeTask : SwTask //Composition for (auto comp = compList.data; comp < (compList.data + compList.count); ++comp) { + auto compShape = &static_cast((*comp).edata)->shape; if ((*comp).method == CompositeMethod::ClipPath) { - auto compShape = &static_cast((*comp).edata)->shape; //Clip shape rle if (shape.rle) { if (compShape->rect) rleClipRect(shape.rle, &compShape->bbox); @@ -147,8 +147,6 @@ struct SwShapeTask : SwTask } } else if ((*comp).method == CompositeMethod::AlphaMask) { rleAlphaMask(shape.rle, compShape->rle); - } else if (comp.method == CompositeMethod::InvAlphaMask) { - // TODO } } end: @@ -188,14 +186,12 @@ struct SwImageTask : SwTask if (!imageGenRle(&image, pdata, clip, bbox, false, true)) goto end; if (image.rle) { for (auto comp = compList.data; comp < (compList.data + compList.count); ++comp) { + auto compShape = &static_cast((*comp).edata)->shape; if ((*comp).method == CompositeMethod::ClipPath) { - auto compShape = &static_cast((*comp).edata)->shape; if (compShape->rect) rleClipRect(image.rle, &compShape->bbox); else if (compShape->rle) rleClipPath(image.rle, compShape->rle); } else if ((*comp).method == CompositeMethod::AlphaMask) { rleAlphaMask(image.rle, compShape->rle); - } else if ((*comp).method == CompositeMethod::InvAlphaMask) { - // TODO } } }