Bug 234626 - _paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList type contexts as potentially being snapshots
Summary: _paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-12-22 17:10 PST by Matt Woodrow
Modified: 2022-01-12 14:38 PST (History)
5 users (show)

See Also:

Patch (2.03 KB, patch)
2021-12-22 17:14 PST, Matt Woodrow
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2021-12-22 17:10:00 PST

_paintBehaviorForDestinationContext currently always returns `Normal` for contexts that aren't a bitmap context.

AppKit now provides a context that is of type kCGContextTypeDisplayList, and we want to still potentially consider it a snapshot draw (if the other conditions below are met).
Comment 1 Matt Woodrow 2021-12-22 17:14:02 PST
Created attachment 447846 [details]
Comment 2 Matt Woodrow 2021-12-22 17:15:32 PST
No test yet, but happy to add one if anyone has ideas on how to test this.

Ideally we'd test that images get sync decoded from AppKit, but it might be sufficient to have a unit test that passes a display list context, and confirms that the PaintBehavior::Snapshotting flag is set (if this is observable somehow).
Comment 3 EWS 2022-01-12 14:38:35 PST
Committed r287951 (245980@main): <https://commits.webkit.org/245980@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447846 [details].