• Jasper St. Pierre's avatar
    cssshadowvalue: Add a cache for blurred Pango layouts · dadc37e6
    Jasper St. Pierre authored
    Drawing text with Pango is quite expensive, and drawing text and also
    blurring it is *really* expensive. To prevent us from drawing a lot of
    text and then blurring it a lot is *really* expensive.
    We now cache the blurred pixels for the last layout and shadow we made,
    which means we can repeatedly draw labels with a blurred text-shadow
    extremely fast.
    To detect whether the shadow is up-to-date, we track the serial of the
    PangoLayout alongside the radius of the box shadow. We don't support
    inset shadows nor spread on text-shadow, so we don't need to track
gtkcssshadowvalue.c 26 KB