diff --git a/src/lib/tvgSceneImpl.h b/src/lib/tvgSceneImpl.h index 9ce4d0b3..d0a0530f 100644 --- a/src/lib/tvgSceneImpl.h +++ b/src/lib/tvgSceneImpl.h @@ -100,9 +100,11 @@ struct Scene::Impl if (opacity == 255) return false; //If scene has several children or only scene, it may require composition. - if (paints.count > 1) return true; - if (paints.count == 1 && (*paints.data)->identifier() == TVG_CLASS_ID_SCENE) return true; - return false; + //OPTIMIZE: the bitmap type of the picture would not need the composition. + //OPTIMIZE: a single paint of a scene would not need the composition. + if (paints.count == 1 && (*paints.data)->identifier() == TVG_CLASS_ID_SHAPE) return false; + + return true; } RenderData update(RenderMethod &renderer, const RenderTransform* transform, uint32_t opacity, Array& clips, RenderUpdateFlag flag, bool clipper)