Coordinated Graphics: Rename WebLayerTreeInfo to CoordinatedLayerInfo
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 01:45:07 +0000 (01:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 01:45:07 +0000 (01:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103983

Patch by Jae Hyun Park <jae.park@company100.net> on 2012-12-06
Reviewed by Noam Rosenthal.

This patch refactors WebLayerTreeInfo in 2 areas.

1. WebLayerTreeInfo is only used by Coordinated Graphics. So, the file
should be located in WebKit2/Shared/CoordinatedGraphics instead of
WebKit2/Shared.

2. The name of WebLayerTreeInfo is incorrect. Currently,
WebLayerTreeInfo only has WebLayerInfo struct. Also, it is hard to know
what WebLayer is since we don't use that name anymore. More appropriate
name for WebLayerInfo would be CoordinatedLayerInfo.

No new test, because no behavioral change.

* CMakeLists.txt:
* Scripts/webkit2/messages.py:
(headers_for_type):
* Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.cpp.
(WebKit):
(WebKit::CoordinatedLayerInfo::encode):
(WebKit::CoordinatedLayerInfo::decode):
* Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.h.
(WebKit):
(WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo):
(CoordinatedLayerInfo):
* Shared/LayerTreeContext.h:
(LayerTreeContext):
* Shared/efl/LayerTreeContextEfl.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* Shared/qt/LayerTreeContextQt.cpp:
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* Target.pri:
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
(WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren):
(WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters):
(WebKit::LayerTreeCoordinatorProxy::setLayerAnimations):
(WebKit::LayerTreeCoordinatorProxy::createCanvas):
(WebKit::LayerTreeCoordinatorProxy::syncCanvas):
(WebKit::LayerTreeCoordinatorProxy::destroyCanvas):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(WebKit):
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::LayerTreeRenderer):
(WebKit::LayerTreeRenderer::createLayer):
(WebKit::LayerTreeRenderer::createCanvas):
(WebKit::LayerTreeRenderer::syncCanvas):
(WebKit::LayerTreeRenderer::destroyCanvas):
(WebKit::LayerTreeRenderer::setLayerChildren):
(WebKit::LayerTreeRenderer::setLayerFilters):
(WebKit::LayerTreeRenderer::setLayerState):
(WebKit::LayerTreeRenderer::deleteLayer):
(WebKit::LayerTreeRenderer::ensureLayer):
(WebKit::LayerTreeRenderer::setRootLayerID):
(WebKit::LayerTreeRenderer::createTile):
(WebKit::LayerTreeRenderer::removeTile):
(WebKit::LayerTreeRenderer::updateTile):
(WebKit::LayerTreeRenderer::ensureRootLayer):
(WebKit::LayerTreeRenderer::purgeGLResources):
(WebKit::LayerTreeRenderer::setLayerAnimations):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(WebKit):
(LayerTreeRenderer):
(WebKit::LayerTreeRenderer::layerByID):
* UIProcess/DrawingAreaProxy.h:
(WebKit):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::layerByIDMap):
(WebCore::toCoordinatedLayerID):
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::id):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::syncLayerState):
(WebKit::LayerTreeCoordinator::syncLayerChildren):
(WebKit::LayerTreeCoordinator::createCanvas):
(WebKit::LayerTreeCoordinator::syncCanvas):
(WebKit::LayerTreeCoordinator::destroyCanvas):
(WebKit::LayerTreeCoordinator::syncLayerFilters):
(WebKit::LayerTreeCoordinator::createTile):
(WebKit::LayerTreeCoordinator::updateTile):
(WebKit::LayerTreeCoordinator::removeTile):
(WebKit::LayerTreeCoordinator::setLayerAnimations):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

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

20 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp [moved from Source/WebKit2/Shared/WebLayerTreeInfo.cpp with 72% similarity]
Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedLayerInfo.h [moved from Source/WebKit2/Shared/WebLayerTreeInfo.h with 76% similarity]
Source/WebKit2/Shared/LayerTreeContext.h
Source/WebKit2/Shared/efl/LayerTreeContextEfl.cpp
Source/WebKit2/Shared/qt/LayerTreeContextQt.cpp
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h

index 2f4b3c6..8f3b6f9 100644 (file)
@@ -176,7 +176,6 @@ set(WebKit2_SOURCES
     Shared/WebImage.cpp
     Shared/WebIntentServiceInfo.cpp
     Shared/WebKeyboardEvent.cpp
-    Shared/WebLayerTreeInfo.cpp
     Shared/WebMemorySampler.cpp
     Shared/WebMouseEvent.cpp
     Shared/WebNetworkInfo.cpp
@@ -219,6 +218,7 @@ set(WebKit2_SOURCES
     Shared/API/c/WKUserContentURLPattern.cpp
 
     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp
+    Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp
     Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.cpp
 
     Shared/Plugins/NPIdentifierData.cpp
index 610f0c8..a0e1f2c 100644 (file)
@@ -1,3 +1,116 @@
+2012-12-06  Jae Hyun Park  <jae.park@company100.net>
+
+        Coordinated Graphics: Rename WebLayerTreeInfo to CoordinatedLayerInfo
+        https://bugs.webkit.org/show_bug.cgi?id=103983
+
+        Reviewed by Noam Rosenthal.
+
+        This patch refactors WebLayerTreeInfo in 2 areas.
+
+        1. WebLayerTreeInfo is only used by Coordinated Graphics. So, the file
+        should be located in WebKit2/Shared/CoordinatedGraphics instead of
+        WebKit2/Shared.
+
+        2. The name of WebLayerTreeInfo is incorrect. Currently,
+        WebLayerTreeInfo only has WebLayerInfo struct. Also, it is hard to know
+        what WebLayer is since we don't use that name anymore. More appropriate
+        name for WebLayerInfo would be CoordinatedLayerInfo.
+
+        No new test, because no behavioral change.
+
+        * CMakeLists.txt:
+        * Scripts/webkit2/messages.py:
+        (headers_for_type):
+        * Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.cpp.
+        (WebKit):
+        (WebKit::CoordinatedLayerInfo::encode):
+        (WebKit::CoordinatedLayerInfo::decode):
+        * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.h.
+        (WebKit):
+        (WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo):
+        (CoordinatedLayerInfo):
+        * Shared/LayerTreeContext.h:
+        (LayerTreeContext):
+        * Shared/efl/LayerTreeContextEfl.cpp:
+        (WebKit::LayerTreeContext::LayerTreeContext):
+        (WebKit::LayerTreeContext::encode):
+        (WebKit::LayerTreeContext::decode):
+        (WebKit::LayerTreeContext::isEmpty):
+        (WebKit::operator==):
+        * Shared/qt/LayerTreeContextQt.cpp:
+        (WebKit::LayerTreeContext::LayerTreeContext):
+        (WebKit::LayerTreeContext::encode):
+        (WebKit::LayerTreeContext::decode):
+        (WebKit::LayerTreeContext::isEmpty):
+        (WebKit::operator==):
+        * Target.pri:
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
+        (WebKit::LayerTreeCoordinatorProxy::createTileForLayer):
+        (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
+        (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer):
+        (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer):
+        (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer):
+        (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState):
+        (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren):
+        (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters):
+        (WebKit::LayerTreeCoordinatorProxy::setLayerAnimations):
+        (WebKit::LayerTreeCoordinatorProxy::createCanvas):
+        (WebKit::LayerTreeCoordinatorProxy::syncCanvas):
+        (WebKit::LayerTreeCoordinatorProxy::destroyCanvas):
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
+        (WebKit):
+        (LayerTreeCoordinatorProxy):
+        * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::LayerTreeRenderer):
+        (WebKit::LayerTreeRenderer::createLayer):
+        (WebKit::LayerTreeRenderer::createCanvas):
+        (WebKit::LayerTreeRenderer::syncCanvas):
+        (WebKit::LayerTreeRenderer::destroyCanvas):
+        (WebKit::LayerTreeRenderer::setLayerChildren):
+        (WebKit::LayerTreeRenderer::setLayerFilters):
+        (WebKit::LayerTreeRenderer::setLayerState):
+        (WebKit::LayerTreeRenderer::deleteLayer):
+        (WebKit::LayerTreeRenderer::ensureLayer):
+        (WebKit::LayerTreeRenderer::setRootLayerID):
+        (WebKit::LayerTreeRenderer::createTile):
+        (WebKit::LayerTreeRenderer::removeTile):
+        (WebKit::LayerTreeRenderer::updateTile):
+        (WebKit::LayerTreeRenderer::ensureRootLayer):
+        (WebKit::LayerTreeRenderer::purgeGLResources):
+        (WebKit::LayerTreeRenderer::setLayerAnimations):
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
+        (WebKit):
+        (LayerTreeRenderer):
+        (WebKit::LayerTreeRenderer::layerByID):
+        * UIProcess/DrawingAreaProxy.h:
+        (WebKit):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+        (WebCore::layerByIDMap):
+        (WebCore::toCoordinatedLayerID):
+        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
+        (WebCore::CoordinatedGraphicsLayer::id):
+        (WebCore::CoordinatedGraphicsLayer::syncChildren):
+        (WebCore::CoordinatedGraphicsLayer::syncLayerState):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
+        (CoordinatedGraphicsLayerClient):
+        (CoordinatedGraphicsLayer):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h:
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+        (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+        (WebKit::LayerTreeCoordinator::syncLayerState):
+        (WebKit::LayerTreeCoordinator::syncLayerChildren):
+        (WebKit::LayerTreeCoordinator::createCanvas):
+        (WebKit::LayerTreeCoordinator::syncCanvas):
+        (WebKit::LayerTreeCoordinator::destroyCanvas):
+        (WebKit::LayerTreeCoordinator::syncLayerFilters):
+        (WebKit::LayerTreeCoordinator::createTile):
+        (WebKit::LayerTreeCoordinator::updateTile):
+        (WebKit::LayerTreeCoordinator::removeTile):
+        (WebKit::LayerTreeCoordinator::setLayerAnimations):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r136900.
index 0c9b941..559478c 100644 (file)
@@ -396,11 +396,10 @@ def headers_for_type(type):
         'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
         'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
         'WebCore::ViewportAttributes': ['<WebCore/ViewportArguments.h>'],
+        'WebKit::CoordinatedLayerID': ['"CoordinatedLayerInfo.h"'],
         'WebKit::InjectedBundleUserMessageEncoder': [],
         'WebKit::WebContextUserMessageEncoder': [],
         'WebKit::WebGestureEvent': ['"WebEvent.h"'],
-        'WebKit::WebLayerID': ['"WebLayerTreeInfo.h"'],
-        'WebKit::WebLayerInfo': ['"WebLayerTreeInfo.h"'],
         'WebKit::WebKeyboardEvent': ['"WebEvent.h"'],
         'WebKit::WebMouseEvent': ['"WebEvent.h"'],
         'WebKit::WebTouchEvent': ['"WebEvent.h"'],
@@ -20,7 +20,7 @@
 #include "config.h"
 
 #if USE(COORDINATED_GRAPHICS)
-#include "WebLayerTreeInfo.h"
+#include "CoordinatedLayerInfo.h"
 
 #include "ArgumentCoders.h"
 #include "Arguments.h"
@@ -30,14 +30,14 @@ using namespace CoreIPC;
 
 namespace WebKit {
 
-void WebLayerInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
+void CoordinatedLayerInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    SimpleArgumentCoder<WebLayerInfo>::encode(encoder, *this);
+    SimpleArgumentCoder<CoordinatedLayerInfo>::encode(encoder, *this);
 }
 
-bool WebLayerInfo::decode(CoreIPC::ArgumentDecoder* decoder, WebLayerInfo& info)
+bool CoordinatedLayerInfo::decode(CoreIPC::ArgumentDecoder* decoder, CoordinatedLayerInfo& info)
 {
-    return SimpleArgumentCoder<WebLayerInfo>::decode(decoder, info);
+    return SimpleArgumentCoder<CoordinatedLayerInfo>::decode(decoder, info);
 }
 }
-#endif
+#endif // USE(COORDINATED_GRAPHICS)
@@ -17,8 +17,8 @@
  Boston, MA 02110-1301, USA.
  */
 
-#ifndef WebLayerTreeInfo_h
-#define WebLayerTreeInfo_h
+#ifndef CoordinatedLayerInfo_h
+#define CoordinatedLayerInfo_h
 
 #if USE(COORDINATED_GRAPHICS)
 
 
 namespace WebKit {
 
-typedef uint32_t WebLayerID;
-enum { InvalidWebLayerID = 0 };
+typedef uint32_t CoordinatedLayerID;
+enum { InvalidCoordinatedLayerID = 0 };
 
 typedef uint64_t CoordinatedImageBackingID;
 enum { InvalidCoordinatedImageBackingID = 0 };
 
-// NOTE: WebLayerInfo should only use POD types, as to make serialization faster.
-struct WebLayerInfo {
-    WebLayerInfo()
-        : replica(InvalidWebLayerID)
-        , mask(InvalidWebLayerID)
+// NOTE: CoordinatedLayerInfo should only use POD types, as to make serialization faster.
+struct CoordinatedLayerInfo {
+    CoordinatedLayerInfo()
+        : replica(InvalidCoordinatedLayerID)
+        , mask(InvalidCoordinatedLayerID)
         , imageID(InvalidCoordinatedImageBackingID)
         , opacity(0)
         , flags(0) { }
 
-    WebLayerID replica;
-    WebLayerID mask;
+    CoordinatedLayerID replica;
+    CoordinatedLayerID mask;
     CoordinatedImageBackingID imageID;
 
     WebCore::FloatPoint pos;
@@ -69,15 +69,15 @@ struct WebLayerInfo {
             bool isRootLayer: 1;
             bool fixedToViewport : 1;
         };
-        unsigned int flags;
+        unsigned flags;
     };
 
     void encode(CoreIPC::ArgumentEncoder&) const;
-    static bool decode(CoreIPC::ArgumentDecoder*, WebLayerInfo&);
+    static bool decode(CoreIPC::ArgumentDecoder*, CoordinatedLayerInfo&);
 };
 
 }
 
-#endif // USE(ACCELERATED_COMPOSITING)
+#endif // USE(COORDINATED_GRAPHICS)
 
-#endif // WebLayerTreeInfo_h
+#endif // CoordinatedLayerInfo_h
index f8e2fce..3ff7cb4 100644 (file)
@@ -57,11 +57,11 @@ public:
 #elif PLATFORM(WIN)
     HWND window;
 #elif PLATFORM(QT)
-    uint32_t webLayerID;
+    uint32_t coordinatedLayerID;
 #elif PLATFORM(GTK)
     uint64_t windowHandle;
 #elif PLATFORM(EFL)
-    uint32_t webLayerID;
+    uint32_t coordinatedLayerID;
 #endif
 };
 
index 32fa970..1fa635d 100644 (file)
@@ -32,7 +32,7 @@
 namespace WebKit {
 
 LayerTreeContext::LayerTreeContext()
-    : webLayerID(0)
+    : coordinatedLayerID(0)
 {
 }
 
@@ -42,22 +42,22 @@ LayerTreeContext::~LayerTreeContext()
 
 void LayerTreeContext::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(webLayerID);
+    encoder.encode(coordinatedLayerID);
 }
 
 bool LayerTreeContext::decode(CoreIPC::ArgumentDecoder* decoder, LayerTreeContext& context)
 {
-    return decoder->decode(context.webLayerID);
+    return decoder->decode(context.coordinatedLayerID);
 }
 
 bool LayerTreeContext::isEmpty() const
 {
-    return !webLayerID;
+    return !coordinatedLayerID;
 }
 
 bool operator==(const LayerTreeContext& a, const LayerTreeContext& b)
 {
-    return a.webLayerID == b.webLayerID;
+    return a.coordinatedLayerID == b.coordinatedLayerID;
 }
 
 } // namespace WebKit
index 00ea873..9fc4163 100644 (file)
@@ -32,7 +32,7 @@
 namespace WebKit {
 
 LayerTreeContext::LayerTreeContext()
-    : webLayerID(0)
+    : coordinatedLayerID(0)
 {
 }
 
@@ -42,22 +42,22 @@ LayerTreeContext::~LayerTreeContext()
 
 void LayerTreeContext::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(webLayerID);
+    encoder.encode(coordinatedLayerID);
 }
 
 bool LayerTreeContext::decode(CoreIPC::ArgumentDecoder* decoder, LayerTreeContext& context)
 {
-    return decoder->decode(context.webLayerID);
+    return decoder->decode(context.coordinatedLayerID);
 }
 
 bool LayerTreeContext::isEmpty() const
 {
-    return !webLayerID;
+    return !coordinatedLayerID;
 }
 
 bool operator==(const LayerTreeContext& a, const LayerTreeContext& b)
 {
-    return a.webLayerID == b.webLayerID;
+    return a.coordinatedLayerID == b.coordinatedLayerID;
 }
 
 } // namespace WebKit
index 023d745..1260b3c 100644 (file)
@@ -121,7 +121,6 @@ HEADERS += \
     Shared/WebHitTestResult.h \
     Shared/WebImage.h \
     Shared/WebIntentServiceInfo.h \
-    Shared/WebLayerTreeInfo.h \
     Shared/WebNavigationDataStore.h \
     Shared/WebNumber.h \
     Shared/WebOpenPanelParameters.h \
@@ -136,6 +135,7 @@ HEADERS += \
     Shared/WebURLResponse.h \
     Shared/WebUserContentURLPattern.h \
     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h \
+    Shared/CoordinatedGraphics/CoordinatedLayerInfo.h \
     Shared/CoordinatedGraphics/WebCustomFilterProgram.h \
     Shared/Plugins/Netscape/NetscapePluginModule.h \
     Shared/Plugins/NPRemoteObjectMap.h \
@@ -488,7 +488,6 @@ SOURCES += \
     Shared/WebKeyboardEvent.cpp \
     Shared/WebImage.cpp \
     Shared/WebIntentServiceInfo.cpp \
-    Shared/WebLayerTreeInfo.cpp \
     Shared/WebMouseEvent.cpp \
     Shared/WebNetworkInfo.cpp \
     Shared/WebOpenPanelParameters.cpp \
@@ -505,6 +504,7 @@ SOURCES += \
     Shared/WebURLResponse.cpp \
     Shared/WebWheelEvent.cpp \
     Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp \
+    Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp \
     Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.cpp \
     Shared/qt/ArgumentCodersQt.cpp \
     Shared/qt/LayerTreeContextQt.cpp \
index 8435e61..2b61eb9 100644 (file)
 #if USE(COORDINATED_GRAPHICS)
 #include "LayerTreeCoordinatorProxy.h"
 
+#include "CoordinatedLayerInfo.h"
 #include "LayerTreeCoordinatorMessages.h"
 #include "LayerTreeRenderer.h"
 #include "UpdateInfo.h"
 #include "WebCoreArgumentCoders.h"
-#include "WebLayerTreeInfo.h"
 #include "WebPageProxy.h"
 #include "WebProcessProxy.h"
 #include <WebCore/GraphicsSurface.h>
@@ -61,20 +61,20 @@ void LayerTreeCoordinatorProxy::dispatchUpdate(const Function<void()>& function)
     m_renderer->appendUpdate(function);
 }
 
-void LayerTreeCoordinatorProxy::createTileForLayer(WebLayerID layerID, uint32_t tileID, const WebCore::IntRect& tileRect, const WebKit::SurfaceUpdateInfo& updateInfo)
+void LayerTreeCoordinatorProxy::createTileForLayer(CoordinatedLayerID layerID, uint32_t tileID, const WebCore::IntRect& tileRect, const WebKit::SurfaceUpdateInfo& updateInfo)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::createTile, m_renderer.get(), layerID, tileID, updateInfo.scaleFactor));
     updateTileForLayer(layerID, tileID, tileRect, updateInfo);
 }
 
-void LayerTreeCoordinatorProxy::updateTileForLayer(WebLayerID layerID, uint32_t tileID, const IntRect& tileRect, const WebKit::SurfaceUpdateInfo& updateInfo)
+void LayerTreeCoordinatorProxy::updateTileForLayer(CoordinatedLayerID layerID, uint32_t tileID, const IntRect& tileRect, const WebKit::SurfaceUpdateInfo& updateInfo)
 {
     SurfaceMap::iterator it = m_surfaces.find(updateInfo.atlasID);
     ASSERT(it != m_surfaces.end());
     dispatchUpdate(bind(&LayerTreeRenderer::updateTile, m_renderer.get(), layerID, tileID, LayerTreeRenderer::TileUpdate(updateInfo.updateRect, tileRect, it->value, updateInfo.surfaceOffset)));
 }
 
-void LayerTreeCoordinatorProxy::removeTileForLayer(WebLayerID layerID, uint32_t tileID)
+void LayerTreeCoordinatorProxy::removeTileForLayer(CoordinatedLayerID layerID, uint32_t tileID)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::removeTile, m_renderer.get(), layerID, tileID));
 }
@@ -91,28 +91,28 @@ void LayerTreeCoordinatorProxy::removeUpdateAtlas(int atlasID)
     m_surfaces.remove(atlasID);
 }
 
-void LayerTreeCoordinatorProxy::deleteCompositingLayer(WebLayerID id)
+void LayerTreeCoordinatorProxy::deleteCompositingLayer(CoordinatedLayerID id)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::deleteLayer, m_renderer.get(), id));
 }
 
-void LayerTreeCoordinatorProxy::setRootCompositingLayer(WebLayerID id)
+void LayerTreeCoordinatorProxy::setRootCompositingLayer(CoordinatedLayerID id)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::setRootLayerID, m_renderer.get(), id));
 }
 
-void LayerTreeCoordinatorProxy::setCompositingLayerState(WebLayerID id, const WebLayerInfo& info)
+void LayerTreeCoordinatorProxy::setCompositingLayerState(CoordinatedLayerID id, const CoordinatedLayerInfo& info)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::setLayerState, m_renderer.get(), id, info));
 }
 
-void LayerTreeCoordinatorProxy::setCompositingLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
+void LayerTreeCoordinatorProxy::setCompositingLayerChildren(CoordinatedLayerID id, const Vector<CoordinatedLayerID>& children)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::setLayerChildren, m_renderer.get(), id, children));
 }
 
 #if ENABLE(CSS_FILTERS)
-void LayerTreeCoordinatorProxy::setCompositingLayerFilters(WebLayerID id, const FilterOperations& filters)
+void LayerTreeCoordinatorProxy::setCompositingLayerFilters(CoordinatedLayerID id, const FilterOperations& filters)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::setLayerFilters, m_renderer.get(), id, filters));
 }
@@ -166,7 +166,7 @@ void LayerTreeCoordinatorProxy::setContentsSize(const FloatSize& contentsSize)
     dispatchUpdate(bind(&LayerTreeRenderer::setContentsSize, m_renderer.get(), contentsSize));
 }
 
-void LayerTreeCoordinatorProxy::setLayerAnimations(WebLayerID id, const GraphicsLayerAnimations& animations)
+void LayerTreeCoordinatorProxy::setLayerAnimations(CoordinatedLayerID id, const GraphicsLayerAnimations& animations)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::setLayerAnimations, m_renderer.get(), id, animations));
 }
@@ -216,18 +216,18 @@ void LayerTreeCoordinatorProxy::didChangeScrollPosition(const IntPoint& position
 }
 
 #if USE(GRAPHICS_SURFACE)
-void LayerTreeCoordinatorProxy::createCanvas(WebLayerID id, const IntSize& canvasSize, const GraphicsSurfaceToken& token)
+void LayerTreeCoordinatorProxy::createCanvas(CoordinatedLayerID id, const IntSize& canvasSize, const GraphicsSurfaceToken& token)
 {
     GraphicsSurface::Flags surfaceFlags = GraphicsSurface::SupportsTextureTarget | GraphicsSurface::SupportsSharing;
     dispatchUpdate(bind(&LayerTreeRenderer::createCanvas, m_renderer.get(), id, canvasSize, GraphicsSurface::create(canvasSize, surfaceFlags, token)));
 }
 
-void LayerTreeCoordinatorProxy::syncCanvas(WebLayerID id, uint32_t frontBuffer)
+void LayerTreeCoordinatorProxy::syncCanvas(CoordinatedLayerID id, uint32_t frontBuffer)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::syncCanvas, m_renderer.get(), id, frontBuffer));
 }
 
-void LayerTreeCoordinatorProxy::destroyCanvas(WebLayerID id)
+void LayerTreeCoordinatorProxy::destroyCanvas(CoordinatedLayerID id)
 {
     dispatchUpdate(bind(&LayerTreeRenderer::destroyCanvas, m_renderer.get(), id));
 }
index 2305ffd..daf3882 100644 (file)
 
 #include "BackingStore.h"
 #include "CoordinatedGraphicsArgumentCoders.h"
+#include "CoordinatedLayerInfo.h"
 #include "DrawingAreaProxy.h"
 #include "Region.h"
 #include "ShareableSurface.h"
 #include "SurfaceUpdateInfo.h"
-#include "WebLayerTreeInfo.h"
 #include <WebCore/GraphicsContext.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/GraphicsLayerAnimation.h>
@@ -42,9 +42,9 @@
 
 namespace WebKit {
 
-class WebLayerInfo;
+class CoordinatedLayerInfo;
 class LayerTreeRenderer;
-class WebLayerUpdateInfo;
+class CoordinatedLayerUpdateInfo;
 
 class LayerTreeCoordinatorProxy {
     WTF_MAKE_NONCOPYABLE(LayerTreeCoordinatorProxy);
@@ -52,23 +52,23 @@ class LayerTreeCoordinatorProxy {
 public:
     explicit LayerTreeCoordinatorProxy(DrawingAreaProxy*);
     ~LayerTreeCoordinatorProxy();
-    void setCompositingLayerState(WebLayerID, const WebLayerInfo&);
-    void setCompositingLayerChildren(WebLayerID, const Vector<WebLayerID>&);
+    void setCompositingLayerState(CoordinatedLayerID, const CoordinatedLayerInfo&);
+    void setCompositingLayerChildren(CoordinatedLayerID, const Vector<CoordinatedLayerID>&);
 #if ENABLE(CSS_FILTERS)
-    void setCompositingLayerFilters(WebLayerID, const WebCore::FilterOperations&);
+    void setCompositingLayerFilters(CoordinatedLayerID, const WebCore::FilterOperations&);
 #endif
 #if ENABLE(CSS_SHADERS)
     void createCustomFilterProgram(int id, const WebCore::CustomFilterProgramInfo&);
     void removeCustomFilterProgram(int id);
 #endif
-    void deleteCompositingLayer(WebLayerID);
-    void setRootCompositingLayer(WebLayerID);
+    void deleteCompositingLayer(CoordinatedLayerID);
+    void setRootCompositingLayer(CoordinatedLayerID);
     void setContentsSize(const WebCore::FloatSize&);
     void setVisibleContentsRect(const WebCore::FloatRect&, float scale, const WebCore::FloatPoint& trajectoryVector);
     void didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect);
-    void createTileForLayer(WebLayerID, uint32_t tileID, const WebCore::IntRect&, const SurfaceUpdateInfo&);
-    void updateTileForLayer(WebLayerID, uint32_t tileID, const WebCore::IntRect&, const SurfaceUpdateInfo&);
-    void removeTileForLayer(WebLayerID, uint32_t tileID);
+    void createTileForLayer(CoordinatedLayerID, uint32_t tileID, const WebCore::IntRect&, const SurfaceUpdateInfo&);
+    void updateTileForLayer(CoordinatedLayerID, uint32_t tileID, const WebCore::IntRect&, const SurfaceUpdateInfo&);
+    void removeTileForLayer(CoordinatedLayerID, uint32_t tileID);
     void createUpdateAtlas(int atlasID, const ShareableSurface::Handle&);
     void removeUpdateAtlas(int atlasID);
     void createImageBacking(CoordinatedImageBackingID);
@@ -80,13 +80,13 @@ public:
     void renderNextFrame();
     void didChangeScrollPosition(const WebCore::IntPoint& position);
 #if USE(GRAPHICS_SURFACE)
-    void createCanvas(WebLayerID, const WebCore::IntSize&, const WebCore::GraphicsSurfaceToken&);
-    void syncCanvas(WebLayerID, uint32_t frontBuffer);
-    void destroyCanvas(WebLayerID);
+    void createCanvas(CoordinatedLayerID, const WebCore::IntSize&, const WebCore::GraphicsSurfaceToken&);
+    void syncCanvas(CoordinatedLayerID, uint32_t frontBuffer);
+    void destroyCanvas(CoordinatedLayerID);
 #endif
     void purgeBackingStores();
     LayerTreeRenderer* layerTreeRenderer() const { return m_renderer.get(); }
-    void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
+    void setLayerAnimations(CoordinatedLayerID, const WebCore::GraphicsLayerAnimations&);
     void setAnimationsLocked(bool);
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     void requestAnimationFrame();
index 35c19ff..8f7ac5a 100644 (file)
@@ -19,7 +19,7 @@
 
 #if USE(COORDINATED_GRAPHICS)
 messages -> LayerTreeCoordinatorProxy {
-    SetCompositingLayerState(uint32_t id, WebKit::WebLayerInfo layerInfo)
+    SetCompositingLayerState(uint32_t id, WebKit::CoordinatedLayerInfo layerInfo)
     SetCompositingLayerChildren(uint32_t id, Vector<uint32_t> children)
 #if ENABLE(CSS_FILTERS)
     SetCompositingLayerFilters(uint32_t id, WebCore::FilterOperations filters)
index c672822..f8fe6b7 100644 (file)
@@ -74,7 +74,7 @@ static bool layerShouldHaveBackingStore(GraphicsLayer* layer)
 LayerTreeRenderer::LayerTreeRenderer(LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy)
     : m_layerTreeCoordinatorProxy(layerTreeCoordinatorProxy)
     , m_isActive(false)
-    , m_rootLayerID(InvalidWebLayerID)
+    , m_rootLayerID(InvalidCoordinatedLayerID)
     , m_animationsLocked(false)
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     , m_animationFrameRequested(false)
@@ -89,7 +89,7 @@ LayerTreeRenderer::~LayerTreeRenderer()
 {
 }
 
-PassOwnPtr<GraphicsLayer> LayerTreeRenderer::createLayer(WebLayerID)
+PassOwnPtr<GraphicsLayer> LayerTreeRenderer::createLayer(CoordinatedLayerID)
 {
     GraphicsLayerTextureMapper* newLayer = new GraphicsLayerTextureMapper(this);
     newLayer->setHasOwnBackingStore(false);
@@ -227,7 +227,7 @@ void LayerTreeRenderer::didChangeScrollPosition(const IntPoint& position)
 }
 
 #if USE(GRAPHICS_SURFACE)
-void LayerTreeRenderer::createCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, PassRefPtr<GraphicsSurface> surface)
+void LayerTreeRenderer::createCanvas(CoordinatedLayerID id, const WebCore::IntSize& canvasSize, PassRefPtr<GraphicsSurface> surface)
 {
     ASSERT(m_textureMapper);
     GraphicsLayer* layer = layerByID(id);
@@ -241,7 +241,7 @@ void LayerTreeRenderer::createCanvas(WebLayerID id, const WebCore::IntSize& canv
     layer->setContentsToMedia(canvasBackingStore.get());
 }
 
-void LayerTreeRenderer::syncCanvas(WebLayerID id, uint32_t frontBuffer)
+void LayerTreeRenderer::syncCanvas(CoordinatedLayerID id, uint32_t frontBuffer)
 {
     ASSERT(m_textureMapper);
     ASSERT(m_surfaceBackingStores.contains(id));
@@ -252,7 +252,7 @@ void LayerTreeRenderer::syncCanvas(WebLayerID id, uint32_t frontBuffer)
     canvasBackingStore->swapBuffersIfNeeded(frontBuffer);
 }
 
-void LayerTreeRenderer::destroyCanvas(WebLayerID id)
+void LayerTreeRenderer::destroyCanvas(CoordinatedLayerID id)
 {
     ASSERT(m_textureMapper);
     GraphicsLayer* layer = layerByID(id);
@@ -264,13 +264,13 @@ void LayerTreeRenderer::destroyCanvas(WebLayerID id)
 }
 #endif
 
-void LayerTreeRenderer::setLayerChildren(WebLayerID id, const Vector<WebLayerID>& childIDs)
+void LayerTreeRenderer::setLayerChildren(CoordinatedLayerID id, const Vector<CoordinatedLayerID>& childIDs)
 {
     GraphicsLayer* layer = ensureLayer(id);
     Vector<GraphicsLayer*> children;
 
     for (size_t i = 0; i < childIDs.size(); ++i) {
-        WebLayerID childID = childIDs[i];
+        CoordinatedLayerID childID = childIDs[i];
         GraphicsLayer* child = layerByID(childID);
         if (!child) {
             OwnPtr<GraphicsLayer*> newChild = createLayer(childID);
@@ -283,7 +283,7 @@ void LayerTreeRenderer::setLayerChildren(WebLayerID id, const Vector<WebLayerID>
 }
 
 #if ENABLE(CSS_FILTERS)
-void LayerTreeRenderer::setLayerFilters(WebLayerID id, const FilterOperations& filters)
+void LayerTreeRenderer::setLayerFilters(CoordinatedLayerID id, const FilterOperations& filters)
 {
     GraphicsLayer* layer = ensureLayer(id);
 
@@ -326,7 +326,7 @@ void LayerTreeRenderer::removeCustomFilterProgram(int id)
 }
 #endif // ENABLE(CSS_SHADERS)
 
-void LayerTreeRenderer::setLayerState(WebLayerID id, const WebLayerInfo& layerInfo)
+void LayerTreeRenderer::setLayerState(CoordinatedLayerID id, const CoordinatedLayerInfo& layerInfo)
 {
     GraphicsLayer* layer = ensureLayer(id);
 
@@ -362,7 +362,7 @@ void LayerTreeRenderer::setLayerState(WebLayerID id, const WebLayerInfo& layerIn
         setRootLayerID(id);
 }
 
-void LayerTreeRenderer::deleteLayer(WebLayerID layerID)
+void LayerTreeRenderer::deleteLayer(CoordinatedLayerID layerID)
 {
     OwnPtr<GraphicsLayer> layer = m_layers.take(layerID);
     if (!layer)
@@ -377,7 +377,7 @@ void LayerTreeRenderer::deleteLayer(WebLayerID layerID)
 }
 
 
-WebCore::GraphicsLayer* LayerTreeRenderer::ensureLayer(WebLayerID id)
+WebCore::GraphicsLayer* LayerTreeRenderer::ensureLayer(CoordinatedLayerID id)
 {
     LayerMap::iterator it = m_layers.find(id);
     if (it != m_layers.end())
@@ -390,7 +390,7 @@ WebCore::GraphicsLayer* LayerTreeRenderer::ensureLayer(WebLayerID id)
     return layer;
 }
 
-void LayerTreeRenderer::setRootLayerID(WebLayerID layerID)
+void LayerTreeRenderer::setRootLayerID(CoordinatedLayerID layerID)
 {
     if (layerID == m_rootLayerID)
         return;
@@ -485,7 +485,7 @@ void LayerTreeRenderer::resetBackingStoreSizeToLayerSize(GraphicsLayer* graphics
     backingStore->setSize(graphicsLayer->size());
 }
 
-void LayerTreeRenderer::createTile(WebLayerID layerID, uint32_t tileID, float scale)
+void LayerTreeRenderer::createTile(CoordinatedLayerID layerID, uint32_t tileID, float scale)
 {
     GraphicsLayer* layer = layerByID(layerID);
     ASSERT(layer);
@@ -495,7 +495,7 @@ void LayerTreeRenderer::createTile(WebLayerID layerID, uint32_t tileID, float sc
     resetBackingStoreSizeToLayerSize(layer);
 }
 
-void LayerTreeRenderer::removeTile(WebLayerID layerID, uint32_t tileID)
+void LayerTreeRenderer::removeTile(CoordinatedLayerID layerID, uint32_t tileID)
 {
     GraphicsLayer* layer = layerByID(layerID);
     ASSERT(layer);
@@ -508,7 +508,7 @@ void LayerTreeRenderer::removeTile(WebLayerID layerID, uint32_t tileID)
     m_backingStoresWithPendingBuffers.add(backingStore);
 }
 
-void LayerTreeRenderer::updateTile(WebLayerID layerID, uint32_t tileID, const TileUpdate& update)
+void LayerTreeRenderer::updateTile(CoordinatedLayerID layerID, uint32_t tileID, const TileUpdate& update)
 {
     GraphicsLayer* layer = layerByID(layerID);
     ASSERT(layer);
@@ -620,7 +620,7 @@ void LayerTreeRenderer::ensureRootLayer()
     if (m_rootLayer)
         return;
 
-    m_rootLayer = createLayer(InvalidWebLayerID);
+    m_rootLayer = createLayer(InvalidCoordinatedLayerID);
     m_rootLayer->setMasksToBounds(false);
     m_rootLayer->setDrawsContent(false);
     m_rootLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
@@ -663,7 +663,7 @@ void LayerTreeRenderer::purgeGLResources()
 
     m_rootLayer->removeAllChildren();
     m_rootLayer.clear();
-    m_rootLayerID = InvalidWebLayerID;
+    m_rootLayerID = InvalidCoordinatedLayerID;
     m_layers.clear();
     m_fixedLayers.clear();
     m_textureMapper.clear();
@@ -680,7 +680,7 @@ void LayerTreeRenderer::purgeBackingStores()
         m_layerTreeCoordinatorProxy->purgeBackingStores();
 }
 
-void LayerTreeRenderer::setLayerAnimations(WebLayerID id, const GraphicsLayerAnimations& animations)
+void LayerTreeRenderer::setLayerAnimations(CoordinatedLayerID id, const GraphicsLayerAnimations& animations)
 {
     GraphicsLayerTextureMapper* layer = toGraphicsLayerTextureMapper(layerByID(id));
     if (!layer)
index a03c982..99123f0 100644 (file)
 
 #if USE(COORDINATED_GRAPHICS)
 #include "BackingStore.h"
+#include "CoordinatedLayerInfo.h"
 #include "ShareableSurface.h"
 #include "TextureMapper.h"
 #include "TextureMapperBackingStore.h"
-#include "WebLayerTreeInfo.h"
 #include <WebCore/GraphicsContext.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/GraphicsLayerAnimation.h>
@@ -48,8 +48,8 @@ namespace WebKit {
 
 class CoordinatedBackingStore;
 class LayerTreeCoordinatorProxy;
-class WebLayerInfo;
-class WebLayerUpdateInfo;
+class CoordinatedLayerInfo;
+class CoordinatedLayerUpdateInfo;
 
 class LayerTreeRenderer : public ThreadSafeRefCounted<LayerTreeRenderer>, public WebCore::GraphicsLayerClient {
 public:
@@ -74,9 +74,9 @@ public:
     void setVisibleContentsRect(const WebCore::FloatRect&);
     void didChangeScrollPosition(const WebCore::IntPoint& position);
 #if USE(GRAPHICS_SURFACE)
-    void createCanvas(WebLayerID, const WebCore::IntSize&, PassRefPtr<WebCore::GraphicsSurface>);
-    void syncCanvas(WebLayerID, uint32_t frontBuffer);
-    void destroyCanvas(WebLayerID);
+    void createCanvas(CoordinatedLayerID, const WebCore::IntSize&, PassRefPtr<WebCore::GraphicsSurface>);
+    void syncCanvas(CoordinatedLayerID, uint32_t frontBuffer);
+    void destroyCanvas(CoordinatedLayerID);
 #endif
 
     void detach();
@@ -87,12 +87,12 @@ public:
     void purgeGLResources();
     void setActive(bool);
 
-    void deleteLayer(WebLayerID);
-    void setRootLayerID(WebLayerID);
-    void setLayerChildren(WebLayerID, const Vector<WebLayerID>&);
-    void setLayerState(WebLayerID, const WebLayerInfo&);
+    void deleteLayer(CoordinatedLayerID);
+    void setRootLayerID(CoordinatedLayerID);
+    void setLayerChildren(CoordinatedLayerID, const Vector<CoordinatedLayerID>&);
+    void setLayerState(CoordinatedLayerID, const CoordinatedLayerInfo&);
 #if ENABLE(CSS_FILTERS)
-    void setLayerFilters(WebLayerID, const WebCore::FilterOperations&);
+    void setLayerFilters(CoordinatedLayerID, const WebCore::FilterOperations&);
 #endif
 #if ENABLE(CSS_SHADERS)
     void injectCachedCustomFilterPrograms(const WebCore::FilterOperations& filters) const;
@@ -100,15 +100,15 @@ public:
     void removeCustomFilterProgram(int id);
 #endif
 
-    void createTile(WebLayerID, uint32_t tileID, float scale);
-    void removeTile(WebLayerID, uint32_t tileID);
-    void updateTile(WebLayerID, uint32_t tileID, const TileUpdate&);
+    void createTile(CoordinatedLayerID, uint32_t tileID, float scale);
+    void removeTile(CoordinatedLayerID, uint32_t tileID);
+    void updateTile(CoordinatedLayerID, uint32_t tileID, const TileUpdate&);
     void flushLayerChanges();
     void createImageBacking(CoordinatedImageBackingID);
     void updateImageBacking(CoordinatedImageBackingID, PassRefPtr<ShareableSurface>);
     void clearImageBackingContents(CoordinatedImageBackingID);
     void removeImageBacking(CoordinatedImageBackingID);
-    void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
+    void setLayerAnimations(CoordinatedLayerID, const WebCore::GraphicsLayerAnimations&);
     void setAnimationsLocked(bool);
     void setBackgroundColor(const WebCore::Color&);
     void setDrawsBackground(bool enable) { m_setDrawsBackground = enable; }
@@ -118,9 +118,9 @@ public:
 #endif
 
 private:
-    PassOwnPtr<WebCore::GraphicsLayer> createLayer(WebLayerID);
+    PassOwnPtr<WebCore::GraphicsLayer> createLayer(CoordinatedLayerID);
 
-    WebCore::GraphicsLayer* layerByID(WebLayerID id) { return (id == InvalidWebLayerID) ? 0 : m_layers.get(id); }
+    WebCore::GraphicsLayer* layerByID(CoordinatedLayerID id) { return (id == InvalidCoordinatedLayerID) ? 0 : m_layers.get(id); }
     WebCore::GraphicsLayer* rootLayer() { return m_rootLayer.get(); }
 
     void syncRemoteContent();
@@ -142,7 +142,7 @@ private:
     void assignImageBackingToLayer(WebCore::GraphicsLayer*, CoordinatedImageBackingID);
     void removeReleasedImageBackingsIfNeeded();
     void ensureRootLayer();
-    WebCore::GraphicsLayer* ensureLayer(WebLayerID);
+    WebCore::GraphicsLayer* ensureLayer(CoordinatedLayerID);
     void commitPendingBackingStoreOperations();
 
     CoordinatedBackingStore* getBackingStore(WebCore::GraphicsLayer*);
@@ -170,7 +170,7 @@ private:
     HashSet<RefPtr<CoordinatedBackingStore> > m_backingStoresWithPendingBuffers;
 
 #if USE(GRAPHICS_SURFACE)
-    typedef HashMap<WebLayerID, RefPtr<WebCore::TextureMapperSurfaceBackingStore> > SurfaceBackingStoreMap;
+    typedef HashMap<CoordinatedLayerID, RefPtr<WebCore::TextureMapperSurfaceBackingStore> > SurfaceBackingStoreMap;
     SurfaceBackingStoreMap m_surfaceBackingStores;
 #endif
 
@@ -180,11 +180,11 @@ private:
 
     OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
 
-    typedef HashMap<WebLayerID, OwnPtr<WebCore::GraphicsLayer> > LayerMap;
+    typedef HashMap<CoordinatedLayerID, OwnPtr<WebCore::GraphicsLayer> > LayerMap;
     LayerMap m_layers;
-    typedef HashMap<WebLayerID, WebCore::GraphicsLayer*> LayerRawPtrMap;
+    typedef HashMap<CoordinatedLayerID, WebCore::GraphicsLayer*> LayerRawPtrMap;
     LayerRawPtrMap m_fixedLayers;
-    WebLayerID m_rootLayerID;
+    CoordinatedLayerID m_rootLayerID;
     WebCore::IntPoint m_renderedContentsScrollPosition;
     WebCore::IntPoint m_pendingRenderedContentsScrollPosition;
     bool m_animationsLocked;
index c4ed068..d6799dd 100644 (file)
@@ -50,8 +50,6 @@ namespace WebKit {
 class LayerTreeContext;
 class LayerTreeCoordinatorProxy;
 class UpdateInfo;
-class WebLayerTreeInfo;
-class WebLayerUpdateInfo;
 class WebPageProxy;
 
 class DrawingAreaProxy {
index 9856f51..d6ad77a 100644 (file)
@@ -42,13 +42,13 @@ using namespace WebKit;
 
 namespace WebCore {
 
-static HashMap<WebLayerID, CoordinatedGraphicsLayer*>& layerByIDMap()
+static HashMap<CoordinatedLayerID, CoordinatedGraphicsLayer*>& layerByIDMap()
 {
-    static HashMap<WebLayerID, CoordinatedGraphicsLayer*> globalMap;
+    static HashMap<CoordinatedLayerID, CoordinatedGraphicsLayer*> globalMap;
     return globalMap;
 }
 
-static WebLayerID toWebLayerID(GraphicsLayer* layer)
+static CoordinatedLayerID toCoordinatedLayerID(GraphicsLayer* layer)
 {
     return layer ? toCoordinatedGraphicsLayer(layer)->id() : 0;
 }
@@ -124,7 +124,7 @@ CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient* client)
     , m_canvasPlatformLayer(0)
     , m_animationStartedTimer(this, &CoordinatedGraphicsLayer::animationStartedTimerFired)
 {
-    static WebLayerID nextLayerID = 1;
+    static CoordinatedLayerID nextLayerID = 1;
     m_id = nextLayerID++;
     layerByIDMap().add(id(), this);
 }
@@ -441,7 +441,7 @@ void CoordinatedGraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect)
     didChangeLayerState();
 }
 
-WebLayerID CoordinatedGraphicsLayer::id() const
+CoordinatedLayerID CoordinatedGraphicsLayer::id() const
 {
     return m_id;
 }
@@ -472,9 +472,9 @@ void CoordinatedGraphicsLayer::syncChildren()
     if (!m_shouldSyncChildren)
         return;
     m_shouldSyncChildren = false;
-    Vector<WebLayerID> childIDs;
+    Vector<CoordinatedLayerID> childIDs;
     for (size_t i = 0; i < children().size(); ++i)
-        childIDs.append(toWebLayerID(children()[i]));
+        childIDs.append(toCoordinatedLayerID(children()[i]));
 
     m_coordinator->syncLayerChildren(m_id, childIDs);
 }
@@ -531,12 +531,12 @@ void CoordinatedGraphicsLayer::syncLayerState()
     m_layerInfo.contentsRect = contentsRect();
     m_layerInfo.drawsContent = drawsContent();
     m_layerInfo.contentsVisible = contentsAreVisible();
-    m_layerInfo.mask = toWebLayerID(maskLayer());
+    m_layerInfo.mask = toCoordinatedLayerID(maskLayer());
     m_layerInfo.masksToBounds = masksToBounds();
     m_layerInfo.opacity = opacity();
     m_layerInfo.pos = position();
     m_layerInfo.preserves3D = preserves3D();
-    m_layerInfo.replica = toWebLayerID(replicaLayer());
+    m_layerInfo.replica = toCoordinatedLayerID(replicaLayer());
     m_layerInfo.size = size();
     m_layerInfo.transform = transform();
     m_coordinator->syncLayerState(m_id, m_layerInfo);
index 30fb87d..564a974 100644 (file)
@@ -22,6 +22,7 @@
 #define CoordinatedGraphicsLayer_h
 
 #include "CoordinatedImageBacking.h"
+#include "CoordinatedLayerInfo.h"
 #include "CoordinatedTile.h"
 #include "FloatPoint3D.h"
 #include "GraphicsLayer.h"
@@ -34,7 +35,6 @@
 #include "TiledBackingStoreClient.h"
 #include "TransformationMatrix.h"
 #include "UpdateInfo.h"
-#include "WebLayerTreeInfo.h"
 #include "WebProcess.h"
 #if USE(GRAPHICS_SURFACE)
 #include <WebCore/GraphicsSurfaceToken.h>
@@ -53,25 +53,25 @@ namespace WebKit {
 class CoordinatedGraphicsLayerClient {
 public:
     // CoordinatedTileClient
-    virtual void createTile(WebLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&) = 0;
-    virtual void updateTile(WebLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&) = 0;
-    virtual void removeTile(WebLayerID, uint32_t tileID) = 0;
+    virtual void createTile(CoordinatedLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&) = 0;
+    virtual void updateTile(CoordinatedLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&) = 0;
+    virtual void removeTile(CoordinatedLayerID, uint32_t tileID) = 0;
 
     virtual WebCore::IntRect visibleContentsRect() const = 0;
     virtual bool layerTreeTileUpdatesAllowed() const = 0;
     virtual PassRefPtr<CoordinatedImageBacking> createImageBackingIfNeeded(WebCore::Image*) = 0;
-    virtual void syncLayerState(WebLayerID, const WebLayerInfo&) = 0;
-    virtual void syncLayerChildren(WebLayerID, const Vector<WebLayerID>&) = 0;
+    virtual void syncLayerState(CoordinatedLayerID, const CoordinatedLayerInfo&) = 0;
+    virtual void syncLayerChildren(CoordinatedLayerID, const Vector<CoordinatedLayerID>&) = 0;
 #if ENABLE(CSS_FILTERS)
-    virtual void syncLayerFilters(WebLayerID, const WebCore::FilterOperations&) = 0;
+    virtual void syncLayerFilters(CoordinatedLayerID, const WebCore::FilterOperations&) = 0;
 #endif
 #if USE(GRAPHICS_SURFACE)
-    virtual void createCanvas(WebLayerID, WebCore::PlatformLayer*) = 0;
-    virtual void syncCanvas(WebLayerID, WebCore::PlatformLayer*) = 0;
-    virtual void destroyCanvas(WebLayerID) = 0;
+    virtual void createCanvas(CoordinatedLayerID, WebCore::PlatformLayer*) = 0;
+    virtual void syncCanvas(CoordinatedLayerID, WebCore::PlatformLayer*) = 0;
+    virtual void destroyCanvas(CoordinatedLayerID) = 0;
 #endif
 
-    virtual void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&) = 0;
+    virtual void setLayerAnimations(CoordinatedLayerID, const WebCore::GraphicsLayerAnimations&) = 0;
 
     virtual void detachLayer(WebCore::CoordinatedGraphicsLayer*) = 0;
     virtual void syncFixedLayers() = 0;
@@ -135,7 +135,7 @@ public:
 
     void setRootLayer(bool);
 
-    WebKit::WebLayerID id() const;
+    WebKit::CoordinatedLayerID id() const;
 
     void setFixedToViewport(bool isFixed) { m_fixedToViewport = isFixed; }
 
@@ -206,8 +206,8 @@ private:
 
     void animationStartedTimerFired(Timer<CoordinatedGraphicsLayer>*);
 
-    WebKit::WebLayerID m_id;
-    WebKit::WebLayerInfo m_layerInfo;
+    WebKit::CoordinatedLayerID m_id;
+    WebKit::CoordinatedLayerInfo m_layerInfo;
     GraphicsLayerTransform m_layerTransform;
     TransformationMatrix m_cachedInverseTransform;
     bool m_inUpdateMode : 1;
index 76266a4..65e8246 100644 (file)
@@ -28,9 +28,9 @@
 #define CoordinatedImageBacking_h
 
 #if USE(COORDINATED_GRAPHICS)
+#include "CoordinatedLayerInfo.h"
 #include "Image.h"
 #include "ShareableSurface.h"
-#include "WebLayerTreeInfo.h"
 #include <WebCore/Timer.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
index abc2c0f..c985d11 100644 (file)
@@ -1,4 +1,4 @@
-    /*
+/*
  * Copyright (C) 2011 Apple Inc. All rights reserved.
  * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  *
@@ -99,14 +99,14 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
 {
     // Create a root layer.
     m_rootLayer = GraphicsLayer::create(this, this);
-    CoordinatedGraphicsLayer* webRootLayer = toCoordinatedGraphicsLayer(m_rootLayer.get());
-    webRootLayer->setRootLayer(true);
+    CoordinatedGraphicsLayer* coordinatedRootLayer = toCoordinatedGraphicsLayer(m_rootLayer.get());
+    coordinatedRootLayer->setRootLayer(true);
 #ifndef NDEBUG
     m_rootLayer->setName("LayerTreeCoordinator root layer");
 #endif
     m_rootLayer->setDrawsContent(false);
     m_rootLayer->setSize(m_webPage->size());
-    m_layerTreeContext.webLayerID = toCoordinatedGraphicsLayer(webRootLayer)->id();
+    m_layerTreeContext.coordinatedLayerID = toCoordinatedGraphicsLayer(coordinatedRootLayer)->id();
 
     m_nonCompositedContentLayer = GraphicsLayer::create(this, this);
 #ifndef NDEBUG
@@ -306,7 +306,7 @@ bool LayerTreeCoordinator::flushPendingLayerChanges()
     return didSync;
 }
 
-void LayerTreeCoordinator::syncLayerState(WebLayerID id, const WebLayerInfo& info)
+void LayerTreeCoordinator::syncLayerState(CoordinatedLayerID id, const CoordinatedLayerInfo& info)
 {
     if (m_shouldSendScrollPositionUpdate) {
         m_webPage->send(Messages::LayerTreeCoordinatorProxy::DidChangeScrollPosition(m_visibleContentsRect.location()));
@@ -317,14 +317,14 @@ void LayerTreeCoordinator::syncLayerState(WebLayerID id, const WebLayerInfo& inf
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerState(id, info));
 }
 
-void LayerTreeCoordinator::syncLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
+void LayerTreeCoordinator::syncLayerChildren(CoordinatedLayerID id, const Vector<CoordinatedLayerID>& children)
 {
     m_shouldSyncFrame = true;
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerChildren(id, children));
 }
 
 #if USE(GRAPHICS_SURFACE)
-void LayerTreeCoordinator::createCanvas(WebLayerID id, PlatformLayer* canvasPlatformLayer)
+void LayerTreeCoordinator::createCanvas(CoordinatedLayerID id, PlatformLayer* canvasPlatformLayer)
 {
     m_shouldSyncFrame = true;
     GraphicsSurfaceToken token = canvasPlatformLayer->graphicsSurfaceToken();
@@ -332,14 +332,14 @@ void LayerTreeCoordinator::createCanvas(WebLayerID id, PlatformLayer* canvasPlat
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::CreateCanvas(id, canvasSize, token));
 }
 
-void LayerTreeCoordinator::syncCanvas(WebLayerID id, PlatformLayer* canvasPlatformLayer)
+void LayerTreeCoordinator::syncCanvas(CoordinatedLayerID id, PlatformLayer* canvasPlatformLayer)
 {
     m_shouldSyncFrame = true;
     uint32_t frontBuffer = canvasPlatformLayer->copyToGraphicsSurface();
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SyncCanvas(id, frontBuffer));
 }
 
-void LayerTreeCoordinator::destroyCanvas(WebLayerID id)
+void LayerTreeCoordinator::destroyCanvas(CoordinatedLayerID id)
 {
     if (m_isPurging)
         return;
@@ -350,7 +350,7 @@ void LayerTreeCoordinator::destroyCanvas(WebLayerID id)
 #endif
 
 #if ENABLE(CSS_FILTERS)
-void LayerTreeCoordinator::syncLayerFilters(WebLayerID id, const FilterOperations& filters)
+void LayerTreeCoordinator::syncLayerFilters(CoordinatedLayerID id, const FilterOperations& filters)
 {
     m_shouldSyncFrame = true;
 #if ENABLE(CSS_SHADERS)
@@ -639,19 +639,19 @@ bool LayerTreeHost::supportsAcceleratedCompositing()
     return true;
 }
 
-void LayerTreeCoordinator::createTile(WebLayerID layerID, uint32_t tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& tileRect)
+void LayerTreeCoordinator::createTile(CoordinatedLayerID layerID, uint32_t tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& tileRect)
 {
     m_shouldSyncFrame = true;
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::CreateTileForLayer(layerID, tileID, tileRect, updateInfo));
 }
 
-void LayerTreeCoordinator::updateTile(WebLayerID layerID, uint32_t tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& tileRect)
+void LayerTreeCoordinator::updateTile(CoordinatedLayerID layerID, uint32_t tileID, const SurfaceUpdateInfo& updateInfo, const WebCore::IntRect& tileRect)
 {
     m_shouldSyncFrame = true;
     m_webPage->send(Messages::LayerTreeCoordinatorProxy::UpdateTileForLayer(layerID, tileID, tileRect, updateInfo));
 }
 
-void LayerTreeCoordinator::removeTile(WebLayerID layerID, uint32_t tileID)
+void LayerTreeCoordinator::removeTile(CoordinatedLayerID layerID, uint32_t tileID)
 {
     if (m_isPurging)
         return;
@@ -677,7 +677,7 @@ WebCore::IntRect LayerTreeCoordinator::visibleContentsRect() const
 }
 
 
-void LayerTreeCoordinator::setLayerAnimations(WebLayerID layerID, const GraphicsLayerAnimations& animations)
+void LayerTreeCoordinator::setLayerAnimations(CoordinatedLayerID layerID, const GraphicsLayerAnimations& animations)
 {
     m_shouldSyncFrame = true;
     GraphicsLayerAnimations activeAnimations = animations.getActiveAnimations();
index 4d29523..268a8a9 100644 (file)
@@ -78,9 +78,9 @@ public:
     virtual void deviceScaleFactorDidChange() { }
     virtual PassRefPtr<CoordinatedImageBacking> createImageBackingIfNeeded(WebCore::Image*) OVERRIDE;
 
-    virtual void createTile(WebLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&);
-    virtual void updateTile(WebLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&);
-    virtual void removeTile(WebLayerID, uint32_t tileID);
+    virtual void createTile(CoordinatedLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&);
+    virtual void updateTile(CoordinatedLayerID, uint32_t tileID, const SurfaceUpdateInfo&, const WebCore::IntRect&);
+    virtual void removeTile(CoordinatedLayerID, uint32_t tileID);
     virtual WebCore::IntRect visibleContentsRect() const;
     virtual void renderNextFrame();
     virtual void purgeBackingStores();
@@ -89,16 +89,16 @@ public:
     virtual void didReceiveLayerTreeCoordinatorMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
     virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() OVERRIDE;
 
-    virtual void syncLayerState(WebLayerID, const WebLayerInfo&);
-    virtual void syncLayerChildren(WebLayerID, const Vector<WebLayerID>&);
-    virtual void setLayerAnimations(WebLayerID, const WebCore::GraphicsLayerAnimations&);
+    virtual void syncLayerState(CoordinatedLayerID, const CoordinatedLayerInfo&);
+    virtual void syncLayerChildren(CoordinatedLayerID, const Vector<CoordinatedLayerID>&);
+    virtual void setLayerAnimations(CoordinatedLayerID, const WebCore::GraphicsLayerAnimations&);
 #if ENABLE(CSS_FILTERS)
-    virtual void syncLayerFilters(WebLayerID, const WebCore::FilterOperations&);
+    virtual void syncLayerFilters(CoordinatedLayerID, const WebCore::FilterOperations&);
 #endif
 #if USE(GRAPHICS_SURFACE)
-    virtual void createCanvas(WebLayerID, WebCore::PlatformLayer*) OVERRIDE;
-    virtual void syncCanvas(WebLayerID, WebCore::PlatformLayer*) OVERRIDE;
-    virtual void destroyCanvas(WebLayerID) OVERRIDE;
+    virtual void createCanvas(CoordinatedLayerID, WebCore::PlatformLayer*) OVERRIDE;
+    virtual void syncCanvas(CoordinatedLayerID, WebCore::PlatformLayer*) OVERRIDE;
+    virtual void destroyCanvas(CoordinatedLayerID) OVERRIDE;
 #endif
     virtual void detachLayer(WebCore::CoordinatedGraphicsLayer*);
     virtual void syncFixedLayers();
@@ -171,7 +171,7 @@ private:
     OwnPtr<WebCore::GraphicsLayer> m_pageOverlayLayer;
 
     HashSet<WebCore::CoordinatedGraphicsLayer*> m_registeredLayers;
-    Vector<WebLayerID> m_detachedLayers;
+    Vector<CoordinatedLayerID> m_detachedLayers;
     typedef HashMap<CoordinatedImageBackingID, RefPtr<CoordinatedImageBacking> > ImageBackingMap;
     ImageBackingMap m_imageBackings;
     Vector<OwnPtr<UpdateAtlas> > m_updateAtlases;