856 {
857 if (caseP.has_mutating_save_layer()) {
858 return false;
859 }
860 if (
env.ref_clip_bounds() !=
renderer.setup_clip_bounds() ||
861 caseP.has_diff_clip()) {
862 return false;
863 }
865 return false;
866 }
868 return true;
869 }
870 const DlPaint& ref_attr =
env.ref_dl_paint();
872 ref_attr.isAntiAlias() != attr.isAntiAlias()) {
874
875
876 } else {
877 return false;
878 }
879 }
881 ref_attr.getColor() != attr.getColor()) {
882 return false;
883 }
885 ref_attr.getBlendMode() != attr.getBlendMode()) {
886 return false;
887 }
889 (ref_attr.isInvertColors() != attr.isInvertColors() ||
890 NotEquals(ref_attr.getColorFilter(), attr.getColorFilter()))) {
891 return false;
892 }
894 NotEquals(ref_attr.getMaskFilter(), attr.getMaskFilter())) {
895 return false;
896 }
898 ref_attr.getImageFilter() != attr.getImageFilter()) {
899 return false;
900 }
902 NotEquals(ref_attr.getColorSource(), attr.getColorSource())) {
903 return false;
904 }
905
906 bool is_stroked = flags_.
is_stroked(attr.getDrawStyle());
907 if (flags_.
is_stroked(ref_attr.getDrawStyle()) != is_stroked) {
908 return false;
909 }
910 DisplayListSpecialGeometryFlags geo_flags =
913 ref_attr.getPathEffect() != attr.getPathEffect()) {
915
916
917 } else {
918 switch (attr.getPathEffect()->type()) {
921 return false;
922 }
923 break;
924 }
925 }
926 }
927 }
928 if (!is_stroked) {
929 return true;
930 }
931 if (ref_attr.getStrokeWidth() != attr.getStrokeWidth()) {
932 return false;
933 }
934 if (geo_flags.may_have_end_caps() &&
935 getCap(ref_attr, geo_flags) !=
getCap(attr, geo_flags)) {
936 return false;
937 }
938 if (geo_flags.may_have_joins()) {
939 if (ref_attr.getStrokeJoin() != attr.getStrokeJoin()) {
940 return false;
941 }
943 SkScalar ref_miter = ref_attr.getStrokeMiter();
944 SkScalar test_miter = attr.getStrokeMiter();
945
946 if (geo_flags.may_have_acute_joins() ||
947 ref_miter < 1.4 || test_miter < 1.4) {
948 if (ref_miter != test_miter) {
949 return false;
950 }
951 }
952 }
953 }
954 return true;
955 }
constexpr bool applies_color() const
constexpr bool is_stroked(DlDrawStyle style=DlDrawStyle::kStroke) const
constexpr bool applies_color_filter() const
constexpr bool ignores_paint() const
constexpr bool applies_image_filter() const
constexpr bool applies_path_effect() const
constexpr bool applies_shader() const
constexpr bool applies_anti_alias() const
constexpr bool applies_mask_filter() const
constexpr bool applies_blend() const
The primitive honors the DlBlendMode.
constexpr bool is_flood() const
bool ignores_dashes() const
DlStrokeCap getCap(const DlPaint &attr, DisplayListSpecialGeometryFlags geo_flags) const
bool NotEquals(const T *a, const T *b)