Diff
Modified: trunk/Source/WebKit2/ChangeLog (134311 => 134312)
--- trunk/Source/WebKit2/ChangeLog 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-12 22:45:05 UTC (rev 134312)
@@ -1,5 +1,29 @@
2012-11-12 Anders Carlsson <[email protected]>
+ Rename RemoteLayerTreeController to RemoteLayerTreeContext
+ https://bugs.webkit.org/show_bug.cgi?id=101993
+
+ Reviewed by Andreas Kling.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebPage/mac/RemoteGraphicsLayer.h:
+ (RemoteGraphicsLayer):
+ * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm:
+ (WebKit::RemoteGraphicsLayer::create):
+ (WebKit::RemoteGraphicsLayer::RemoteGraphicsLayer):
+ (WebKit::RemoteGraphicsLayer::flushCompositingStateForThisLayerOnly):
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h.
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm.
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ (RemoteLayerTreeDrawingArea):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+ (WebKit::RemoteLayerTreeDrawingArea::graphicsLayerFactory):
+ (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
+ (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
+
+2012-11-12 Anders Carlsson <[email protected]>
+
Add debug only code to dump the contents of a transaction
https://bugs.webkit.org/show_bug.cgi?id=101991
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (134311 => 134312)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-11-12 22:45:05 UTC (rev 134312)
@@ -220,8 +220,8 @@
1AB16ADE1648598400290D62 /* RemoteLayerTreeDrawingArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16ADC1648598400290D62 /* RemoteLayerTreeDrawingArea.h */; };
1AB16AE11648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16ADF1648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm */; };
1AB16AE21648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */; };
- 1AB16AE9164B3A8800290D62 /* RemoteLayerTreeController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeController.mm */; };
- 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeController.h */; };
+ 1AB16AE9164B3A8800290D62 /* RemoteLayerTreeContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeContext.mm */; };
+ 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeContext.h */; };
1AB16AED164B41E400290D62 /* RemoteGraphicsLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */; };
1AB16AEE164B41E400290D62 /* RemoteGraphicsLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */; };
1AB7D4CA1288AAA700CFD08C /* DownloadProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB7D4C81288AAA700CFD08C /* DownloadProxy.h */; };
@@ -1406,8 +1406,8 @@
1AB16ADC1648598400290D62 /* RemoteLayerTreeDrawingArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeDrawingArea.h; sourceTree = "<group>"; };
1AB16ADF1648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerTreeDrawingAreaProxy.mm; sourceTree = "<group>"; };
1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeDrawingAreaProxy.h; sourceTree = "<group>"; };
- 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerTreeController.mm; sourceTree = "<group>"; };
- 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeController.h; sourceTree = "<group>"; };
+ 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerTreeContext.mm; sourceTree = "<group>"; };
+ 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeContext.h; sourceTree = "<group>"; };
1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteGraphicsLayer.mm; sourceTree = "<group>"; };
1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsLayer.h; sourceTree = "<group>"; };
1AB7D4C81288AAA700CFD08C /* DownloadProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProxy.h; sourceTree = "<group>"; };
@@ -3938,8 +3938,8 @@
children = (
1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */,
1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */,
- 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeController.h */,
- 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeController.mm */,
+ 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeContext.h */,
+ 1AB16AE7164B3A8800290D62 /* RemoteLayerTreeContext.mm */,
1AB16ADC1648598400290D62 /* RemoteLayerTreeDrawingArea.h */,
1AB16ADB1648598400290D62 /* RemoteLayerTreeDrawingArea.mm */,
1AAF263714687C39004A1E8A /* TiledCoreAnimationDrawingArea.h */,
@@ -4877,7 +4877,7 @@
E1B78471163F24690007B692 /* RemoteNetworkingContext.h in Headers */,
1AB16ADE1648598400290D62 /* RemoteLayerTreeDrawingArea.h in Headers */,
1AB16AE21648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h in Headers */,
- 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeController.h in Headers */,
+ 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */,
1AB16AEE164B41E400290D62 /* RemoteGraphicsLayer.h in Headers */,
51217461164C20E30037A5C1 /* ShareableResource.h in Headers */,
51217465164C21370037A5C1 /* WebResourceBuffer.h in Headers */,
@@ -5819,7 +5819,7 @@
9F4F59421648B40700493B7E /* SharedWorkerProcessManagerMac.mm in Sources */,
9F4F59441648B67F00493B7E /* SharedWorkerProcessProxyMac.mm in Sources */,
9F4F59461648BA8E00493B7E /* NetworkProcessManagerMac.mm in Sources */,
- 1AB16AE9164B3A8800290D62 /* RemoteLayerTreeController.mm in Sources */,
+ 1AB16AE9164B3A8800290D62 /* RemoteLayerTreeContext.mm in Sources */,
1AB16AED164B41E400290D62 /* RemoteGraphicsLayer.mm in Sources */,
51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */,
51217464164C21370037A5C1 /* WebResourceBuffer.cpp in Sources */,
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.h (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.h 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.h 2012-11-12 22:45:05 UTC (rev 134312)
@@ -30,17 +30,17 @@
namespace WebKit {
-class RemoteLayerTreeController;
+class RemoteLayerTreeContext;
class RemoteGraphicsLayer : public WebCore::GraphicsLayer {
public:
- static PassOwnPtr<WebCore::GraphicsLayer> create(WebCore::GraphicsLayerClient*, RemoteLayerTreeController*);
+ static PassOwnPtr<WebCore::GraphicsLayer> create(WebCore::GraphicsLayerClient*, RemoteLayerTreeContext*);
virtual ~RemoteGraphicsLayer();
uint64_t layerID() const { return m_layerID; }
private:
- RemoteGraphicsLayer(WebCore::GraphicsLayerClient*, RemoteLayerTreeController*);
+ RemoteGraphicsLayer(WebCore::GraphicsLayerClient*, RemoteLayerTreeContext*);
// WebCore::GraphicsLayer
virtual void setName(const String&) OVERRIDE;
@@ -53,7 +53,7 @@
void recursiveCommitChanges();
uint64_t m_layerID;
- RemoteLayerTreeController* m_controller;
+ RemoteLayerTreeContext* m_context;
unsigned m_uncommittedLayerChanges;
};
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.mm (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.mm 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteGraphicsLayer.mm 2012-11-12 22:45:05 UTC (rev 134312)
@@ -26,7 +26,7 @@
#include "config.h"
#include "RemoteGraphicsLayer.h"
-#include "RemoteLayerTreeController.h"
+#include "RemoteLayerTreeContext.h"
#include "RemoteLayerTreeTransaction.h"
#include <wtf/text/CString.h>
@@ -41,20 +41,17 @@
return ++layerID;
}
-PassOwnPtr<GraphicsLayer> RemoteGraphicsLayer::create(GraphicsLayerClient* client, RemoteLayerTreeController* controller)
+PassOwnPtr<GraphicsLayer> RemoteGraphicsLayer::create(GraphicsLayerClient* client, RemoteLayerTreeContext* context)
{
- return adoptPtr(new RemoteGraphicsLayer(client, controller));
+ return adoptPtr(new RemoteGraphicsLayer(client, context));
}
-RemoteGraphicsLayer::RemoteGraphicsLayer(GraphicsLayerClient* client, RemoteLayerTreeController* controller)
+RemoteGraphicsLayer::RemoteGraphicsLayer(GraphicsLayerClient* client, RemoteLayerTreeContext* context)
: GraphicsLayer(client)
, m_layerID(generateLayerID())
- , m_controller(controller)
+ , m_context(context)
, m_uncommittedLayerChanges(RemoteLayerTreeTransaction::NoChange)
{
- // FIXME: This is in place to silence a compiler warning. Remove this
- // once we actually start using m_controller.
- (void)m_controller;
}
RemoteGraphicsLayer::~RemoteGraphicsLayer()
@@ -91,7 +88,7 @@
if (!m_uncommittedLayerChanges)
return;
- m_controller->currentTransaction().layerPropertiesChanged(this, m_uncommittedLayerChanges);
+ m_context->currentTransaction().layerPropertiesChanged(this, m_uncommittedLayerChanges);
m_uncommittedLayerChanges = RemoteLayerTreeTransaction::NoChange;
}
Copied: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (from rev 134307, trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h) (0 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h 2012-11-12 22:45:05 UTC (rev 134312)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RemoteLayerTreeContext_h
+#define RemoteLayerTreeContext_h
+
+#include <WebCore/GraphicsLayerFactory.h>
+#include <WebCore/Timer.h>
+
+namespace WebKit {
+
+class RemoteLayerTreeTransaction;
+class WebPage;
+
+class RemoteLayerTreeContext : public WebCore::GraphicsLayerFactory {
+public:
+ static PassOwnPtr<RemoteLayerTreeContext> create(WebPage*);
+ ~RemoteLayerTreeContext();
+
+ void setRootLayer(WebCore::GraphicsLayer*);
+ void scheduleLayerFlush();
+
+ RemoteLayerTreeTransaction& currentTransaction();
+
+private:
+ explicit RemoteLayerTreeContext(WebPage*);
+
+ // WebCore::GraphicsLayerFactory
+ virtual PassOwnPtr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
+
+ void layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeContext>*);
+ void flushLayers();
+
+ WebPage* m_webPage;
+ WebCore::Timer<RemoteLayerTreeContext> m_layerFlushTimer;
+ RemoteLayerTreeTransaction* m_currentTransaction;
+};
+
+} // namespace WebKit
+
+#endif // RemoteLayerTreeContext_h
Copied: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (from rev 134307, trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm) (0 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm 2012-11-12 22:45:05 UTC (rev 134312)
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "RemoteLayerTreeContext.h"
+
+#import "RemoteGraphicsLayer.h"
+#import "RemoteLayerTreeTransaction.h"
+#import "WebPage.h"
+#import <WebCore/Frame.h>
+#import <WebCore/FrameView.h>
+#import <WebCore/Page.h>
+#import <wtf/PassOwnPtr.h>
+#import <wtf/TemporaryChange.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassOwnPtr<RemoteLayerTreeContext> RemoteLayerTreeContext::create(WebPage* webPage)
+{
+ return adoptPtr(new RemoteLayerTreeContext(webPage));
+}
+
+RemoteLayerTreeContext::RemoteLayerTreeContext(WebPage* webPage)
+ : m_webPage(webPage)
+ , m_layerFlushTimer(this, &RemoteLayerTreeContext::layerFlushTimerFired)
+ , m_currentTransaction(0)
+{
+}
+
+RemoteLayerTreeContext::~RemoteLayerTreeContext()
+{
+}
+
+void RemoteLayerTreeContext::setRootLayer(GraphicsLayer* rootLayer)
+{
+}
+
+void RemoteLayerTreeContext::scheduleLayerFlush()
+{
+ if (m_layerFlushTimer.isActive())
+ return;
+
+ m_layerFlushTimer.startOneShot(0);
+}
+
+RemoteLayerTreeTransaction& RemoteLayerTreeContext::currentTransaction()
+{
+ ASSERT(m_currentTransaction);
+
+ return *m_currentTransaction;
+}
+
+PassOwnPtr<GraphicsLayer> RemoteLayerTreeContext::createGraphicsLayer(GraphicsLayerClient* client)
+{
+ return RemoteGraphicsLayer::create(client, this);
+}
+
+void RemoteLayerTreeContext::layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeContext>*)
+{
+ flushLayers();
+}
+
+void RemoteLayerTreeContext::flushLayers()
+{
+ ASSERT(!m_currentTransaction);
+
+ RemoteLayerTreeTransaction transaction;
+ TemporaryChange<RemoteLayerTreeTransaction*> transactionChange(m_currentTransaction, &transaction);
+
+ m_webPage->layoutIfNeeded();
+ m_webPage->corePage()->mainFrame()->view()->flushCompositingStateIncludingSubframes();
+
+ // FIXME: Package up the transaction and send it to the UI process.
+}
+
+} // namespace WebKit
Deleted: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.h 2012-11-12 22:45:05 UTC (rev 134312)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RemoteLayerTree_h
-#define RemoteLayerTree_h
-
-#include <WebCore/GraphicsLayerFactory.h>
-#include <WebCore/Timer.h>
-
-namespace WebKit {
-
-class RemoteLayerTreeTransaction;
-class WebPage;
-
-class RemoteLayerTreeController : public WebCore::GraphicsLayerFactory {
-public:
- static PassOwnPtr<RemoteLayerTreeController> create(WebPage*);
- ~RemoteLayerTreeController();
-
- void setRootLayer(WebCore::GraphicsLayer*);
- void scheduleLayerFlush();
-
- RemoteLayerTreeTransaction& currentTransaction();
-
-private:
- explicit RemoteLayerTreeController(WebPage*);
-
- // WebCore::GraphicsLayerFactory
- virtual PassOwnPtr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
-
- void layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeController>*);
- void flushLayers();
-
- WebPage* m_webPage;
- WebCore::Timer<RemoteLayerTreeController> m_layerFlushTimer;
- RemoteLayerTreeTransaction* m_currentTransaction;
-};
-
-} // namespace WebKit
-
-#endif // RemoteLayerTree_h
Deleted: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeController.mm 2012-11-12 22:45:05 UTC (rev 134312)
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "RemoteLayerTreeController.h"
-
-#import "RemoteGraphicsLayer.h"
-#import "RemoteLayerTreeTransaction.h"
-#import "WebPage.h"
-#import <WebCore/Frame.h>
-#import <WebCore/FrameView.h>
-#import <WebCore/Page.h>
-#import <wtf/PassOwnPtr.h>
-#import <wtf/TemporaryChange.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-PassOwnPtr<RemoteLayerTreeController> RemoteLayerTreeController::create(WebPage* webPage)
-{
- return adoptPtr(new RemoteLayerTreeController(webPage));
-}
-
-RemoteLayerTreeController::RemoteLayerTreeController(WebPage* webPage)
- : m_webPage(webPage)
- , m_layerFlushTimer(this, &RemoteLayerTreeController::layerFlushTimerFired)
- , m_currentTransaction(0)
-{
-}
-
-RemoteLayerTreeController::~RemoteLayerTreeController()
-{
-}
-
-void RemoteLayerTreeController::setRootLayer(GraphicsLayer* rootLayer)
-{
-}
-
-void RemoteLayerTreeController::scheduleLayerFlush()
-{
- if (m_layerFlushTimer.isActive())
- return;
-
- m_layerFlushTimer.startOneShot(0);
-}
-
-RemoteLayerTreeTransaction& RemoteLayerTreeController::currentTransaction()
-{
- ASSERT(m_currentTransaction);
-
- return *m_currentTransaction;
-}
-
-PassOwnPtr<GraphicsLayer> RemoteLayerTreeController::createGraphicsLayer(GraphicsLayerClient* client)
-{
- return RemoteGraphicsLayer::create(client, this);
-}
-
-void RemoteLayerTreeController::layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeController>*)
-{
- flushLayers();
-}
-
-void RemoteLayerTreeController::flushLayers()
-{
- ASSERT(!m_currentTransaction);
-
- RemoteLayerTreeTransaction transaction;
- TemporaryChange<RemoteLayerTreeTransaction*> transactionChange(m_currentTransaction, &transaction);
-
- m_webPage->layoutIfNeeded();
- m_webPage->corePage()->mainFrame()->view()->flushCompositingStateIncludingSubframes();
-
- // FIXME: Package up the transaction and send it to the UI process.
-}
-
-} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h 2012-11-12 22:45:05 UTC (rev 134312)
@@ -31,7 +31,7 @@
namespace WebKit {
-class RemoteLayerTreeController;
+class RemoteLayerTreeContext;
class RemoteLayerTreeDrawingArea : public DrawingArea {
public:
@@ -49,7 +49,7 @@
virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE;
virtual void scheduleCompositingLayerFlush() OVERRIDE;
- OwnPtr<RemoteLayerTreeController> m_remoteLayerTreeController;
+ OwnPtr<RemoteLayerTreeContext> m_RemoteLayerTreeContext;
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (134311 => 134312)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2012-11-12 22:42:22 UTC (rev 134311)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm 2012-11-12 22:45:05 UTC (rev 134312)
@@ -26,7 +26,7 @@
#import "config.h"
#import "RemoteLayerTreeDrawingArea.h"
-#import "RemoteLayerTreeController.h"
+#import "RemoteLayerTreeContext.h"
using namespace WebCore;
@@ -39,7 +39,7 @@
RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage* webPage, const WebPageCreationParameters&)
: DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
- , m_remoteLayerTreeController(RemoteLayerTreeController::create(webPage))
+ , m_RemoteLayerTreeContext(RemoteLayerTreeContext::create(webPage))
{
}
@@ -57,17 +57,17 @@
GraphicsLayerFactory* RemoteLayerTreeDrawingArea::graphicsLayerFactory()
{
- return m_remoteLayerTreeController.get();
+ return m_RemoteLayerTreeContext.get();
}
void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLayer)
{
- m_remoteLayerTreeController->setRootLayer(rootLayer);
+ m_RemoteLayerTreeContext->setRootLayer(rootLayer);
}
void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush()
{
- m_remoteLayerTreeController->scheduleLayerFlush();
+ m_RemoteLayerTreeContext->scheduleLayerFlush();
}
} // namespace WebKit