Title: [212525] branches/safari-603-branch/Source

Diff

Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (212524 => 212525)


--- branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog	2017-02-17 05:28:00 UTC (rev 212525)
@@ -1,5 +1,25 @@
 2017-02-16  Matthew Hanson  <[email protected]>
 
+        Merge r212260. rdar://problem/30481079
+
+    2017-02-13  Simon Fraser  <[email protected]>
+
+            Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
+            https://bugs.webkit.org/show_bug.cgi?id=168261
+            rdar://problem/30481079
+
+            Reviewed by Tim Horton.
+
+            Add CABackingStoreCollectBlocking() to QuartzCoreSPI.h, and fix files in WebCore
+            that do a framework include.
+
+            * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
+            * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
+            * platform/spi/cocoa/QuartzCoreSPI.h:
+            * platform/spi/mac/NSViewSPI.h:
+
+2017-02-16  Matthew Hanson  <[email protected]>
+
         Merge r212214. rdar://problem/30451581
 
     2017-02-12  Ryosuke Niwa  <[email protected]>

Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm (212524 => 212525)


--- branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm	2017-02-17 05:28:00 UTC (rev 212525)
@@ -32,7 +32,7 @@
 #include "GraphicsContextCG.h"
 #include "IntRect.h"
 
-#import <WebCore/QuartzCoreSPI.h>
+#import "QuartzCoreSPI.h"
 
 #if PLATFORM(IOS)
 #include "WebCoreThread.h"

Modified: branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h (212524 => 212525)


--- branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebCore/platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h	2017-02-17 05:28:00 UTC (rev 212525)
@@ -26,7 +26,7 @@
 #ifndef WebActionDisablingCALayerDelegate_h
 #define WebActionDisablingCALayerDelegate_h
 
-#import <WebCore/QuartzCoreSPI.h>
+#import "QuartzCoreSPI.h"
 
 WEBCORE_EXPORT @interface WebActionDisablingCALayerDelegate : NSObject <CALayerDelegate>
 

Modified: branches/safari-603-branch/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h (212524 => 212525)


--- branches/safari-603-branch/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-02-17 05:28:00 UTC (rev 212525)
@@ -28,6 +28,7 @@
 
 #if USE(APPLE_INTERNAL_SDK)
 
+#include <QuartzCore/CABackingStore.h>
 #include <QuartzCore/CAColorMatrix.h>
 #include <QuartzCore/CARenderServer.h>
 
@@ -196,6 +197,8 @@
 mach_port_t CAMachPortGetPort(CAMachPortRef);
 CFTypeID CAMachPortGetTypeID(void);
 
+void CABackingStoreCollectBlocking(void);
+
 WTF_EXTERN_C_END
 
 // FIXME: Move this into the APPLE_INTERNAL_SDK block once it's in an SDK.
@@ -246,4 +249,5 @@
 
 @protocol CAAnimationDelegate <NSObject>
 @end
-#endif
+
+#endif // USE(APPLE_INTERNAL_SDK)

Modified: branches/safari-603-branch/Source/WebCore/platform/spi/mac/NSViewSPI.h (212524 => 212525)


--- branches/safari-603-branch/Source/WebCore/platform/spi/mac/NSViewSPI.h	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebCore/platform/spi/mac/NSViewSPI.h	2017-02-17 05:28:00 UTC (rev 212525)
@@ -25,7 +25,7 @@
 
 #if USE(APPKIT)
 
-#import <WebCore/QuartzCoreSPI.h>
+#import "QuartzCoreSPI.h"
 
 @interface NSView () <CALayerDelegate>
 @end

Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (212524 => 212525)


--- branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog	2017-02-17 05:28:00 UTC (rev 212525)
@@ -1,5 +1,31 @@
 2017-02-16  Matthew Hanson  <[email protected]>
 
+        Merge r212260. rdar://problem/30481079
+
+    2017-02-13  Simon Fraser  <[email protected]>
+
+            Call WKDestroyRenderingResources() on iOS when tabs are backgrounded
+            https://bugs.webkit.org/show_bug.cgi?id=168261
+            rdar://problem/30481079
+
+            Reviewed by Tim Horton.
+
+            There's code to call CABackingStoreCollectBlocking() on a 10s timer that exists for Mac, but on iOS
+            the web processes are suspended before this timer fires. So call CABackingStoreCollectBlocking()
+            from WebProcess::actualPrepareToSuspend(), which is where we also trigger the markAllLayersVolatile()
+            code.
+
+            Also add CABackingStoreCollectBlocking() to QuartzCoreSPI.h so we can use it without using WKSI.
+
+            Release-log how long this takes, in case we get reports of bad performance. In my testing it could be up to 10ms.
+
+            * WebProcess/WebProcess.cpp:
+            (WebKit::WebProcess::actualPrepareToSuspend):
+            * WebProcess/cocoa/WebProcessCocoa.mm:
+            (WebKit::WebProcess::destroyRenderingResources):
+
+2017-02-16  Matthew Hanson  <[email protected]>
+
         Merge r212256. rdar://problem/30313696
 
     2017-02-13  Brady Eidson  <[email protected]>

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp (212524 => 212525)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2017-02-17 05:28:00 UTC (rev 212525)
@@ -1292,6 +1292,10 @@
         MemoryPressureHandler::singleton().releaseMemory(Critical::Yes, Synchronous::Yes);
 
     setAllLayerTreeStatesFrozen(true);
+    
+#if PLATFORM(COCOA)
+    destroyRenderingResources();
+#endif
 
     markAllLayersVolatile([this, shouldAcknowledgeWhenReadyToSuspend] {
         RELEASE_LOG(ProcessSuspension, "%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);

Modified: branches/safari-603-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (212524 => 212525)


--- branches/safari-603-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2017-02-17 05:13:17 UTC (rev 212524)
+++ branches/safari-603-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2017-02-17 05:28:00 UTC (rev 212525)
@@ -27,6 +27,7 @@
 #import "WebProcess.h"
 
 #import "CustomProtocolManager.h"
+#import "Logging.h"
 #import "ObjCObjectGraph.h"
 #import "SandboxExtension.h"
 #import "SandboxInitializationParameters.h"
@@ -52,6 +53,7 @@
 #import <WebCore/MemoryRelease.h>
 #import <WebCore/NSAccessibilitySPI.h>
 #import <WebCore/PerformanceLogging.h>
+#import <WebCore/QuartzCoreSPI.h>
 #import <WebCore/RuntimeApplicationChecks.h>
 #import <WebCore/VNodeTracker.h>
 #import <WebCore/WebCoreNSURLExtras.h>
@@ -442,7 +444,14 @@
 
 void WebProcess::destroyRenderingResources()
 {
-    WKDestroyRenderingResources();
+#if !RELEASE_LOG_DISABLED
+    double startTime = monotonicallyIncreasingTime();
+#endif
+    CABackingStoreCollectBlocking();
+#if !RELEASE_LOG_DISABLED
+    double endTime = monotonicallyIncreasingTime();
+#endif
+    RELEASE_LOG(ProcessSuspension, "%p - WebProcess::destroyRenderingResources() took %.2fms", this, (endTime - startTime) * 1000.0);
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to