Unreviewed, rolling out r180203 and r180210.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Feb 2015 00:46:33 +0000 (00:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Feb 2015 00:46:33 +0000 (00:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142116

broke process suspension and tile map (Requested by thorton on
#webkit).

Reverted changesets:

"Adopt CAMachPort-as-layer-contents"
https://bugs.webkit.org/show_bug.cgi?id=141687
http://trac.webkit.org/changeset/180203

"Fix the !USE(IOSURFACE) build"
http://trac.webkit.org/changeset/180210

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

Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/MachSendRight.h
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/RemoteLayerBackingStore.h
Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm

index 4b7b76d..eca8a02 100644 (file)
@@ -1,3 +1,20 @@
+2015-02-27  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r180203 and r180210.
+        https://bugs.webkit.org/show_bug.cgi?id=142116
+
+        broke process suspension and tile map (Requested by thorton on
+        #webkit).
+
+        Reverted changesets:
+
+        "Adopt CAMachPort-as-layer-contents"
+        https://bugs.webkit.org/show_bug.cgi?id=141687
+        http://trac.webkit.org/changeset/180203
+
+        "Fix the !USE(IOSURFACE) build"
+        http://trac.webkit.org/changeset/180210
+
 2015-02-27  Sam Weinig  <sam@webkit.org>
 
         Add WebKit2 SPI to create a DOM File object
index 44c5bcc..7c02df6 100644 (file)
@@ -50,8 +50,6 @@ public:
     WEBCORE_EXPORT MachSendRight copySendRight() const;
     WEBCORE_EXPORT mach_port_t leakSendRight() WARN_UNUSED_RETURN;
 
-    explicit operator bool() const { return m_port != MACH_PORT_NULL; }
-
 private:
     explicit MachSendRight(mach_port_t);
 
index b62a5c2..cabb17e 100644 (file)
@@ -142,9 +142,3 @@ EXTERN_C NSString * const kCAFilterExclusionBlendMode;
 EXTERN_C NSString * const kCAContextDisplayName;
 EXTERN_C NSString * const kCAContextDisplayId;
 EXTERN_C NSString * const kCAContextIgnoresHitTest;
-
-// FIXME: These should move into the !USE(APPLE_INTERNAL_SDK) block once they are more readily available.
-typedef struct _CAMachPort *CAMachPortRef;
-extern "C" {
-CAMachPortRef CAMachPortCreate(mach_port_t);
-};
index b9d1b5b..fa200a1 100644 (file)
@@ -1,3 +1,20 @@
+2015-02-27  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r180203 and r180210.
+        https://bugs.webkit.org/show_bug.cgi?id=142116
+
+        broke process suspension and tile map (Requested by thorton on
+        #webkit).
+
+        Reverted changesets:
+
+        "Adopt CAMachPort-as-layer-contents"
+        https://bugs.webkit.org/show_bug.cgi?id=141687
+        http://trac.webkit.org/changeset/180203
+
+        "Fix the !USE(IOSURFACE) build"
+        http://trac.webkit.org/changeset/180210
+
 2015-02-27  Sam Weinig  <sam@webkit.org>
 
         Add WebKit2 SPI to create a DOM File object
index 067cf6e..bae090b 100644 (file)
@@ -29,7 +29,6 @@
 #include "ShareableBitmap.h"
 #include <WebCore/FloatRect.h>
 #include <WebCore/IOSurface.h>
-#include <WebCore/MachSendRight.h>
 #include <WebCore/Region.h>
 #include <chrono>
 
@@ -134,7 +133,6 @@ private:
     Buffer m_backBuffer;
 #if USE(IOSURFACE)
     Buffer m_secondaryBackBuffer;
-    WebCore::MachSendRight m_frontBufferSendRight;
 #endif
 
     RetainPtr<CGContextRef> m_frontContextPendingFlush;
index ad92820..8a02ece 100644 (file)
 #import <WebCore/GraphicsContextCG.h>
 #import <WebCore/IOSurface.h>
 #import <WebCore/IOSurfacePool.h>
+#import <WebCore/MachSendRight.h>
 #import <WebCore/QuartzCoreSPI.h>
-#import <WebCore/SoftLinking.h>
 #import <WebCore/WebLayer.h>
 
 #if USE(IOSURFACE)
 #import <mach/mach_port.h>
-
-SOFT_LINK_FRAMEWORK(QuartzCore);
-SOFT_LINK_MAY_FAIL(QuartzCore, CAMachPortCreate, CAMachPortRef, (mach_port_t port), (port));
 #endif
 
 using namespace WebCore;
@@ -141,12 +138,7 @@ bool RemoteLayerBackingStore::decode(IPC::ArgumentDecoder& decoder, RemoteLayerB
         MachSendRight sendRight;
         if (!decoder.decode(sendRight))
             return false;
-
-        if (canLoadCAMachPortCreate())
-            result.m_frontBufferSendRight = WTF::move(sendRight);
-        else
-            result.m_frontBuffer.surface = IOSurface::createFromSendRight(sendRight, ColorSpaceDeviceRGB);
-
+        result.m_frontBuffer.surface = IOSurface::createFromSendRight(sendRight, ColorSpaceDeviceRGB);
         return true;
     }
 #endif
@@ -383,12 +375,7 @@ void RemoteLayerBackingStore::applyBackingStoreToLayer(CALayer *layer)
 
 #if USE(IOSURFACE)
     if (acceleratesDrawing()) {
-        if (canLoadCAMachPortCreate()) {
-            ASSERT(m_frontBufferSendRight);
-            RetainPtr<CAMachPortRef> port = adoptCF(CAMachPortCreate(m_frontBufferSendRight.leakSendRight()));
-            layer.contents = (id)port.get();
-        } else
-            layer.contents = (id)m_frontBuffer.surface->surface();
+        layer.contents = (id)m_frontBuffer.surface->surface();
         return;
     }
 #endif
@@ -405,7 +392,7 @@ RetainPtr<CGContextRef> RemoteLayerBackingStore::takeFrontContextPendingFlush()
 #if USE(IOSURFACE)
 bool RemoteLayerBackingStore::setBufferVolatility(BufferType type, bool isVolatile)
 {
-    switch (type) {
+    switch(type) {
     case BufferType::Front:
         if (m_frontBuffer.surface && m_frontBuffer.isVolatile != isVolatile) {
             if (isVolatile)