common sw_engine: fix build break.

some wrong merge conflicts left. resolve them.
This commit is contained in:
Hermet Park 2020-12-18 17:44:59 +09:00
parent 4dbdcbd057
commit 82e3553b56
2 changed files with 3 additions and 7 deletions

View file

@ -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)};

View file

@ -133,8 +133,8 @@ struct SwShapeTask : SwTask
//Composition
for (auto comp = compList.data; comp < (compList.data + compList.count); ++comp) {
auto compShape = &static_cast<SwShapeTask*>((*comp).edata)->shape;
if ((*comp).method == CompositeMethod::ClipPath) {
auto compShape = &static_cast<SwShapeTask*>((*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<SwShapeTask*>((*comp).edata)->shape;
if ((*comp).method == CompositeMethod::ClipPath) {
auto compShape = &static_cast<SwShapeTask*>((*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
}
}
}