Title: [289263] branches/safari-613-branch/Source/WebKitLegacy/mac
Revision
289263
Author
[email protected]
Date
2022-02-07 18:52:28 -0800 (Mon, 07 Feb 2022)

Log Message

Cherry-pick r287951. rdar://problem/83501315

    _paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList type contexts as potentially being snapshots
    https://bugs.webkit.org/show_bug.cgi?id=234626
    <rdar://83501315>

    Patch by Matt Woodrow <[email protected]> on 2022-01-12
    Reviewed by Simon Fraser.

    _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 paint (if the other conditions below are met). This ensure images are sync decoded for consumers that just
    want a single paint.

    * WebView/WebFrame.mm:
    (-[WebFrame _paintBehaviorForDestinationContext:]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebKitLegacy/mac/ChangeLog (289262 => 289263)


--- branches/safari-613-branch/Source/WebKitLegacy/mac/ChangeLog	2022-02-08 02:52:26 UTC (rev 289262)
+++ branches/safari-613-branch/Source/WebKitLegacy/mac/ChangeLog	2022-02-08 02:52:28 UTC (rev 289263)
@@ -1,3 +1,40 @@
+2022-02-07  Russell Epstein  <[email protected]>
+
+        Cherry-pick r287951. rdar://problem/83501315
+
+    _paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList type contexts as potentially being snapshots
+    https://bugs.webkit.org/show_bug.cgi?id=234626
+    <rdar://83501315>
+    
+    Patch by Matt Woodrow <[email protected]> on 2022-01-12
+    Reviewed by Simon Fraser.
+    
+    _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 paint (if the other conditions below are met). This ensure images are sync decoded for consumers that just
+    want a single paint.
+    
+    * WebView/WebFrame.mm:
+    (-[WebFrame _paintBehaviorForDestinationContext:]):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-12  Matt Woodrow  <[email protected]>
+
+            _paintBehaviorForDestinationContext should consider kCGContextTypeDisplayList type contexts as potentially being snapshots
+            https://bugs.webkit.org/show_bug.cgi?id=234626
+            <rdar://83501315>
+
+            Reviewed by Simon Fraser.
+
+            _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 paint (if the other conditions below are met). This ensure images are sync decoded for consumers that just
+            want a single paint.
+
+            * WebView/WebFrame.mm:
+            (-[WebFrame _paintBehaviorForDestinationContext:]):
+
 2022-01-11  Russell Epstein  <[email protected]>
 
         Cherry-pick r287884. rdar://problem/87206692

Modified: branches/safari-613-branch/Source/WebKitLegacy/mac/WebView/WebFrame.mm (289262 => 289263)


--- branches/safari-613-branch/Source/WebKitLegacy/mac/WebView/WebFrame.mm	2022-02-08 02:52:26 UTC (rev 289262)
+++ branches/safari-613-branch/Source/WebKitLegacy/mac/WebView/WebFrame.mm	2022-02-08 02:52:28 UTC (rev 289263)
@@ -585,7 +585,7 @@
         return OptionSet<WebCore::PaintBehavior>(WebCore::PaintBehavior::FlattenCompositingLayers) | WebCore::PaintBehavior::Snapshotting;
 #endif
 
-    if (CGContextGetType(context) != kCGContextTypeBitmap)
+    if (CGContextGetType(context) != kCGContextTypeBitmap && CGContextGetType(context) != kCGContextTypeDisplayList)
         return WebCore::PaintBehavior::Normal;
 
     // If we're drawing into a bitmap, we could be snapshotting or drawing into a layer-backed view.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to