<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161192] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161192">161192</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-01 10:34:02 -0800 (Wed, 01 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
https://bugs.webkit.org/show_bug.cgi?id=126346
Source/WebCore:
Reviewed by Tim Horton.
Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
so it makes more sense to put this layerID type on GraphicsLayer as
GraphicsLayer::PlatformLayerID.
Also add some type cast macros for PlatformCALayer and subclasses, and use them
where appropriate.
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::isPlatformCALayerMac):
(WebCore::PlatformCALayer::isPlatformCALayerRemote):
(WebCore::PlatformCALayer::PlatformCALayer):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
Source/WebKit2:
Reviewed by Tim Horton.
Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
so it makes more sense to put this layerID type on GraphicsLayer as
GraphicsLayer::PlatformLayerID.
Also add some type cast macros for PlatformCALayer and subclasses, and use them
where appropriate.
* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::rootLayerID):
(WebKit::RemoteLayerTreeTransaction::changedLayers):
(WebKit::RemoteLayerTreeTransaction::destroyedLayers):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::setRootLayerID):
(WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
(WebKit::RemoteLayerTreeHost::getLayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::primaryLayerID):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(generateLayerID):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::layerID):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCALayerh">trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMach">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreePropertyApplierh">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHosth">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebCore/ChangeLog        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-01-01 Simon Fraser <simon.fraser@apple.com>
+
+ Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
+ https://bugs.webkit.org/show_bug.cgi?id=126346
+
+ Reviewed by Tim Horton.
+
+ Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
+ so it makes more sense to put this layerID type on GraphicsLayer as
+ GraphicsLayer::PlatformLayerID.
+
+ Also add some type cast macros for PlatformCALayer and subclasses, and use them
+ where appropriate.
+
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::setName):
+ * platform/graphics/ca/PlatformCALayer.h:
+ (WebCore::PlatformCALayer::isPlatformCALayerMac):
+ (WebCore::PlatformCALayer::isPlatformCALayerRemote):
+ (WebCore::PlatformCALayer::PlatformCALayer):
+ * platform/graphics/ca/mac/PlatformCALayerMac.h:
+
</ins><span class="cx"> 2013-12-31 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> ScrollingStateNodes should have a reference to the ScrollingStateTree
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -226,6 +226,8 @@
</span><span class="cx"> public:
</span><span class="cx"> static std::unique_ptr<GraphicsLayer> create(GraphicsLayerFactory*, GraphicsLayerClient*);
</span><span class="cx">
</span><ins>+ typedef uint64_t PlatformLayerID;
+
</ins><span class="cx"> virtual ~GraphicsLayer();
</span><span class="cx">
</span><span class="cx"> virtual void initialize() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx"> {
</span><span class="cx"> String caLayerDescription;
</span><span class="cx">
</span><del>- if (!m_layer->isRemote())
</del><ins>+ if (!m_layer->isPlatformCALayerRemote())
</ins><span class="cx"> caLayerDescription = String::format("CALayer(%p) ", m_layer->platformLayer());
</span><span class="cx">
</span><span class="cx"> String longName = caLayerDescription + String::format("GraphicsLayer(%p) ", this) + name;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCALayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -80,6 +80,9 @@
</span><span class="cx">
</span><span class="cx"> virtual ~PlatformCALayer();
</span><span class="cx">
</span><ins>+ virtual bool isPlatformCALayerMac() const { return false; }
+ virtual bool isPlatformCALayerRemote() const { return false; }
+
</ins><span class="cx"> // This function passes the layer as a void* rather than a PlatformLayer because PlatformLayer
</span><span class="cx"> // is defined differently for Obj C and C++. This allows callers from both languages.
</span><span class="cx"> static PlatformCALayer* platformCALayer(void* platformLayer);
</span><span class="lines">@@ -98,7 +101,6 @@
</span><span class="cx"> virtual void setContentsChanged() = 0;
</span><span class="cx">
</span><span class="cx"> LayerType layerType() const { return m_layerType; }
</span><del>- virtual bool isRemote() const { return false; }
</del><span class="cx">
</span><span class="cx"> virtual PlatformCALayer* superlayer() const = 0;
</span><span class="cx"> virtual void removeFromSuperlayer() = 0;
</span><span class="lines">@@ -211,17 +213,18 @@
</span><span class="cx"> PlatformCALayer(LayerType layerType, PlatformCALayerClient* owner)
</span><span class="cx"> : m_layerType(layerType)
</span><span class="cx"> , m_owner(owner)
</span><del>- {
</del><ins>+ { }
</ins><span class="cx">
</span><del>- }
-
</del><span class="cx"> LayerType m_layerType;
</span><span class="cx"> RetainPtr<PlatformLayer> m_layer;
</span><span class="cx"> PlatformCALayerClient* m_owner;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-}
</del><ins>+#define PLATFORM_CALAYER_TYPE_CASTS(ToValueTypeName, predicate) \
+ TYPE_CASTS_BASE(ToValueTypeName, WebCore::PlatformCALayer, object, object->predicate, object.predicate)
</ins><span class="cx">
</span><ins>+} // namespace WebCore
+
</ins><span class="cx"> #endif // USE(ACCELERATED_COMPOSITING)
</span><span class="cx">
</span><span class="cx"> #endif // PlatformCALayer_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -148,6 +148,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> PlatformCALayerMac(LayerType, PlatformLayer*, PlatformCALayerClient* owner);
</span><ins>+ virtual bool isPlatformCALayerMac() const OVERRIDE { return true; }
</ins><span class="cx">
</span><span class="cx"> bool requiresCustomAppearanceUpdateOnBoundsChange() const;
</span><span class="cx">
</span><span class="lines">@@ -156,6 +157,8 @@
</span><span class="cx"> GraphicsLayer::CustomAppearance m_customAppearance;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+PLATFORM_CALAYER_TYPE_CASTS(PlatformCALayerMac, isPlatformCALayerMac())
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // USE(ACCELERATED_COMPOSITING)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2014-01-01 Simon Fraser <simon.fraser@apple.com>
+
+ Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
+ https://bugs.webkit.org/show_bug.cgi?id=126346
+
+ Reviewed by Tim Horton.
+
+ Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
+ so it makes more sense to put this layerID type on GraphicsLayer as
+ GraphicsLayer::PlatformLayerID.
+
+ Also add some type cast macros for PlatformCALayer and subclasses, and use them
+ where appropriate.
+
+ * Shared/mac/RemoteLayerTreePropertyApplier.h:
+ * Shared/mac/RemoteLayerTreeTransaction.h:
+ (WebKit::RemoteLayerTreeTransaction::rootLayerID):
+ (WebKit::RemoteLayerTreeTransaction::changedLayers):
+ (WebKit::RemoteLayerTreeTransaction::destroyedLayers):
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTransaction::decode):
+ (WebKit::RemoteLayerTreeTransaction::setRootLayerID):
+ (WebKit::RemoteLayerTreeTransaction::setDestroyedLayerIDs):
+ (WebKit::RemoteLayerTreeTextStream::operator<<):
+ (WebKit::dumpChangedLayers):
+ (WebKit::RemoteLayerTreeTransaction::description):
+ * UIProcess/mac/RemoteLayerTreeHost.h:
+ * UIProcess/mac/RemoteLayerTreeHost.mm:
+ (WebKit::RemoteLayerTreeHost::commit):
+ (WebKit::RemoteLayerTreeHost::getLayer):
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
+ (WebKit::GraphicsLayerCARemote::primaryLayerID):
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+ (generateLayerID):
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+ (WebKit::PlatformCALayerRemote::layerID):
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+
</ins><span class="cx"> 2014-01-01 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [CMake] Fix the WEBKIT_SRC_DIR define when building the WebKit2 GObject API unit tests
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreePropertyApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">
</span><span class="cx"> class RemoteLayerTreePropertyApplier {
</span><span class="cx"> public:
</span><del>- typedef HashMap<RemoteLayerTreeTransaction::LayerID, CALayer *> RelatedLayerMap;
</del><ins>+ typedef HashMap<WebCore::GraphicsLayer::PlatformLayerID, CALayer *> RelatedLayerMap;
</ins><span class="cx"> static void applyPropertiesToLayer(CALayer *, RemoteLayerTreeTransaction::LayerProperties, RelatedLayerMap);
</span><span class="cx"> static void disableActionsForLayer(CALayer *);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -47,8 +47,6 @@
</span><span class="cx">
</span><span class="cx"> class RemoteLayerTreeTransaction {
</span><span class="cx"> public:
</span><del>- typedef uint64_t LayerID;
-
</del><span class="cx"> enum LayerChange {
</span><span class="cx"> NoChange = 0,
</span><span class="cx"> NameChanged = 1 << 1,
</span><span class="lines">@@ -86,7 +84,7 @@
</span><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, LayerCreationProperties&);
</span><span class="cx">
</span><del>- LayerID layerID;
</del><ins>+ WebCore::GraphicsLayer::PlatformLayerID layerID;
</ins><span class="cx"> WebCore::PlatformCALayer::LayerType type;
</span><span class="cx">
</span><span class="cx"> uint32_t hostingContextID;
</span><span class="lines">@@ -108,7 +106,7 @@
</span><span class="cx"> LayerChange everChangedProperties;
</span><span class="cx">
</span><span class="cx"> String name;
</span><del>- Vector<LayerID> children;
</del><ins>+ Vector<WebCore::GraphicsLayer::PlatformLayerID> children;
</ins><span class="cx"> WebCore::FloatPoint3D position;
</span><span class="cx"> WebCore::FloatSize size;
</span><span class="cx"> WebCore::Color backgroundColor;
</span><span class="lines">@@ -123,7 +121,7 @@
</span><span class="cx"> bool doubleSided;
</span><span class="cx"> bool masksToBounds;
</span><span class="cx"> bool opaque;
</span><del>- LayerID maskLayerID;
</del><ins>+ WebCore::GraphicsLayer::PlatformLayerID maskLayerID;
</ins><span class="cx"> WebCore::FloatRect contentsRect;
</span><span class="cx"> float contentsScale;
</span><span class="cx"> WebCore::PlatformCALayer::FilterType minificationFilter;
</span><span class="lines">@@ -142,11 +140,11 @@
</span><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, RemoteLayerTreeTransaction&);
</span><span class="cx">
</span><del>- LayerID rootLayerID() const { return m_rootLayerID; }
- void setRootLayerID(LayerID rootLayerID);
</del><ins>+ WebCore::GraphicsLayer::PlatformLayerID rootLayerID() const { return m_rootLayerID; }
+ void setRootLayerID(WebCore::GraphicsLayer::PlatformLayerID);
</ins><span class="cx"> void layerPropertiesChanged(PlatformCALayerRemote*, LayerProperties&);
</span><span class="cx"> void setCreatedLayers(Vector<LayerCreationProperties>);
</span><del>- void setDestroyedLayerIDs(Vector<LayerID>);
</del><ins>+ void setDestroyedLayerIDs(Vector<WebCore::GraphicsLayer::PlatformLayerID>);
</ins><span class="cx">
</span><span class="cx"> #if !defined(NDEBUG) || !LOG_DISABLED
</span><span class="cx"> WTF::CString description() const;
</span><span class="lines">@@ -154,14 +152,14 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> Vector<LayerCreationProperties> createdLayers() const { return m_createdLayers; }
</span><del>- HashMap<LayerID, LayerProperties> changedLayers() const { return m_changedLayerProperties; }
- Vector<LayerID> destroyedLayers() const { return m_destroyedLayerIDs; }
</del><ins>+ HashMap<WebCore::GraphicsLayer::PlatformLayerID, LayerProperties> changedLayers() const { return m_changedLayerProperties; }
+ Vector<WebCore::GraphicsLayer::PlatformLayerID> destroyedLayers() const { return m_destroyedLayerIDs; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><del>- LayerID m_rootLayerID;
- HashMap<LayerID, LayerProperties> m_changedLayerProperties;
</del><ins>+ WebCore::GraphicsLayer::PlatformLayerID m_rootLayerID;
+ HashMap<WebCore::GraphicsLayer::PlatformLayerID, LayerProperties> m_changedLayerProperties;
</ins><span class="cx"> Vector<LayerCreationProperties> m_createdLayers;
</span><del>- Vector<LayerID> m_destroyedLayerIDs;
</del><ins>+ Vector<WebCore::GraphicsLayer::PlatformLayerID> m_destroyedLayerIDs;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -359,7 +359,8 @@
</span><span class="cx">
</span><span class="cx"> if (!decoder.decode(result.m_destroyedLayerIDs))
</span><span class="cx"> return false;
</span><del>- for (LayerID layerID : result.m_destroyedLayerIDs) {
</del><ins>+
+ for (auto layerID : result.m_destroyedLayerIDs) {
</ins><span class="cx"> if (!layerID)
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -367,7 +368,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RemoteLayerTreeTransaction::setRootLayerID(LayerID rootLayerID)
</del><ins>+void RemoteLayerTreeTransaction::setRootLayerID(GraphicsLayer::PlatformLayerID rootLayerID)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_ARG(rootLayerID, rootLayerID);
</span><span class="cx">
</span><span class="lines">@@ -384,7 +385,7 @@
</span><span class="cx"> m_createdLayers = std::move(createdLayers);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RemoteLayerTreeTransaction::setDestroyedLayerIDs(Vector<LayerID> destroyedLayerIDs)
</del><ins>+void RemoteLayerTreeTransaction::setDestroyedLayerIDs(Vector<GraphicsLayer::PlatformLayerID> destroyedLayerIDs)
</ins><span class="cx"> {
</span><span class="cx"> m_destroyedLayerIDs = std::move(destroyedLayerIDs);
</span><span class="cx"> }
</span><span class="lines">@@ -406,7 +407,7 @@
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(FloatPoint3D);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(Color);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(FloatRect);
</span><del>- RemoteLayerTreeTextStream& operator<<(const Vector<RemoteLayerTreeTransaction::LayerID>& layers);
</del><ins>+ RemoteLayerTreeTextStream& operator<<(const Vector<WebCore::GraphicsLayer::PlatformLayerID>& layers);
</ins><span class="cx"> RemoteLayerTreeTextStream& operator<<(const FilterOperations&);
</span><span class="cx">
</span><span class="cx"> void increaseIndent() { ++m_indent; }
</span><span class="lines">@@ -537,7 +538,7 @@
</span><span class="cx"> return ts;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(const Vector<RemoteLayerTreeTransaction::LayerID>& layers)
</del><ins>+RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(const Vector<GraphicsLayer::PlatformLayerID>& layers)
</ins><span class="cx"> {
</span><span class="cx"> RemoteLayerTreeTextStream& ts = *this;
</span><span class="cx">
</span><span class="lines">@@ -567,7 +568,7 @@
</span><span class="cx"> ts.decreaseIndent();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void dumpChangedLayers(RemoteLayerTreeTextStream& ts, const HashMap<RemoteLayerTreeTransaction::LayerID, RemoteLayerTreeTransaction::LayerProperties>& changedLayerProperties)
</del><ins>+static void dumpChangedLayers(RemoteLayerTreeTextStream& ts, const HashMap<GraphicsLayer::PlatformLayerID, RemoteLayerTreeTransaction::LayerProperties>& changedLayerProperties)
</ins><span class="cx"> {
</span><span class="cx"> if (changedLayerProperties.isEmpty())
</span><span class="cx"> return;
</span><span class="lines">@@ -577,7 +578,7 @@
</span><span class="cx"> ts << "(changed-layers";
</span><span class="cx">
</span><span class="cx"> // Dump the layer properties sorted by layer ID.
</span><del>- Vector<RemoteLayerTreeTransaction::LayerID> layerIDs;
</del><ins>+ Vector<GraphicsLayer::PlatformLayerID> layerIDs;
</ins><span class="cx"> copyKeysToVector(changedLayerProperties, layerIDs);
</span><span class="cx"> std::sort(layerIDs.begin(), layerIDs.end());
</span><span class="cx">
</span><span class="lines">@@ -593,7 +594,7 @@
</span><span class="cx"> dumpProperty<String>(ts, "name", layerProperties.name);
</span><span class="cx">
</span><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged)
</span><del>- dumpProperty<Vector<RemoteLayerTreeTransaction::LayerID>>(ts, "children", layerProperties.children);
</del><ins>+ dumpProperty<Vector<GraphicsLayer::PlatformLayerID>>(ts, "children", layerProperties.children);
</ins><span class="cx">
</span><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::PositionChanged)
</span><span class="cx"> dumpProperty<FloatPoint3D>(ts, "position", layerProperties.position);
</span><span class="lines">@@ -638,7 +639,7 @@
</span><span class="cx"> dumpProperty<bool>(ts, "opaque", layerProperties.opaque);
</span><span class="cx">
</span><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::MaskLayerChanged)
</span><del>- dumpProperty<RemoteLayerTreeTransaction::LayerID>(ts, "maskLayer", layerProperties.maskLayerID);
</del><ins>+ dumpProperty<GraphicsLayer::PlatformLayerID>(ts, "maskLayer", layerProperties.maskLayerID);
</ins><span class="cx">
</span><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::ContentsRectChanged)
</span><span class="cx"> dumpProperty<FloatRect>(ts, "contentsRect", layerProperties.contentsRect);
</span><span class="lines">@@ -741,7 +742,7 @@
</span><span class="cx"> dumpChangedLayers(ts, m_changedLayerProperties);
</span><span class="cx">
</span><span class="cx"> if (!m_destroyedLayerIDs.isEmpty())
</span><del>- dumpProperty<Vector<RemoteLayerTreeTransaction::LayerID>>(ts, "destroyed-layers", m_destroyedLayerIDs);
</del><ins>+ dumpProperty<Vector<GraphicsLayer::PlatformLayerID>>(ts, "destroyed-layers", m_destroyedLayerIDs);
</ins><span class="cx">
</span><span class="cx"> ts << ")\n";
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -50,13 +50,13 @@
</span><span class="cx"> // Message handlers.
</span><span class="cx"> void commit(const RemoteLayerTreeTransaction&);
</span><span class="cx">
</span><del>- CALayer *getLayer(RemoteLayerTreeTransaction::LayerID);
</del><ins>+ CALayer *getLayer(WebCore::GraphicsLayer::PlatformLayerID) const;
</ins><span class="cx"> CALayer *createLayer(RemoteLayerTreeTransaction::LayerCreationProperties);
</span><span class="cx">
</span><span class="cx"> WebPageProxy* m_webPageProxy;
</span><span class="cx">
</span><span class="cx"> CALayer *m_rootLayer;
</span><del>- HashMap<RemoteLayerTreeTransaction::LayerID, RetainPtr<CALayer>> m_layers;
</del><ins>+ HashMap<WebCore::GraphicsLayer::PlatformLayerID, RetainPtr<CALayer>> m_layers;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto changedLayer : transaction.changedLayers()) {
</span><del>- RemoteLayerTreeTransaction::LayerID layerID = changedLayer.key;
</del><ins>+ auto layerID = changedLayer.key;
</ins><span class="cx"> const auto& properties = changedLayer.value;
</span><span class="cx">
</span><span class="cx"> CALayer *layer = getLayer(layerID);
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> m_layers.remove(destroyedLayer);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CALayer *RemoteLayerTreeHost::getLayer(RemoteLayerTreeTransaction::LayerID layerID)
</del><ins>+CALayer *RemoteLayerTreeHost::getLayer(GraphicsLayer::PlatformLayerID layerID) const
</ins><span class="cx"> {
</span><span class="cx"> return m_layers.get(layerID).get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -38,6 +38,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+GraphicsLayer::PlatformLayerID GraphicsLayerCARemote::primaryLayerID() const
+{
+ return toPlatformCALayerRemote(platformCALayer())->layerID();
+}
+
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx"> bool GraphicsLayerCARemote::filtersCanBeComposited(const FilterOperations& filters)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -44,6 +44,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual ~GraphicsLayerCARemote();
</span><ins>+
+ PlatformLayerID primaryLayerID() const;
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx"> virtual bool filtersCanBeComposited(const WebCore::FilterOperations& filters) OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -47,18 +47,12 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><del>-static RemoteLayerTreeTransaction::LayerID generateLayerID()
</del><ins>+static WebCore::GraphicsLayer::PlatformLayerID generateLayerID()
</ins><span class="cx"> {
</span><del>- static RemoteLayerTreeTransaction::LayerID layerID;
</del><ins>+ static WebCore::GraphicsLayer::PlatformLayerID layerID;
</ins><span class="cx"> return ++layerID;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PlatformCALayerRemote* toPlatformCALayerRemote(PlatformCALayer* layer)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!layer || layer->isRemote());
- return static_cast<PlatformCALayerRemote*>(layer);
-}
-
</del><span class="cx"> PassRefPtr<PlatformCALayerRemote> PlatformCALayerRemote::create(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<PlatformCALayerRemote> layer;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -44,10 +44,8 @@
</span><span class="cx">
</span><span class="cx"> virtual ~PlatformCALayerRemote();
</span><span class="cx">
</span><del>- RemoteLayerTreeTransaction::LayerID layerID() { return m_layerID; }
</del><ins>+ WebCore::GraphicsLayer::PlatformLayerID layerID() { return m_layerID; }
</ins><span class="cx">
</span><del>- virtual bool isRemote() const OVERRIDE { return true; }
-
</del><span class="cx"> virtual bool usesTiledBackingLayer() const OVERRIDE { return layerType() == LayerTypePageTiledBackingLayer || layerType() == LayerTypeTiledBackingLayer; }
</span><span class="cx">
</span><span class="cx"> virtual PlatformLayer* platformLayer() const OVERRIDE { return nullptr; }
</span><span class="lines">@@ -157,12 +155,13 @@
</span><span class="cx"> PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context);
</span><span class="cx">
</span><span class="cx"> private:
</span><ins>+ virtual bool isPlatformCALayerRemote() const OVERRIDE { return false; }
</ins><span class="cx"> void ensureBackingStore();
</span><span class="cx"> void removeSublayer(PlatformCALayerRemote*);
</span><span class="cx">
</span><span class="cx"> bool requiresCustomAppearanceUpdateOnBoundsChange() const;
</span><span class="cx">
</span><del>- RemoteLayerTreeTransaction::LayerID m_layerID;
</del><ins>+ const WebCore::GraphicsLayer::PlatformLayerID m_layerID;
</ins><span class="cx"> RemoteLayerTreeTransaction::LayerProperties m_properties;
</span><span class="cx"> WebCore::PlatformCALayerList m_children;
</span><span class="cx"> PlatformCALayerRemote* m_superlayer;
</span><span class="lines">@@ -172,6 +171,8 @@
</span><span class="cx"> RemoteLayerTreeContext* m_context;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+PLATFORM_CALAYER_TYPE_CASTS(PlatformCALayerRemote, isPlatformCALayerRemote())
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx">
</span><span class="cx"> #endif // USE(ACCELERATED_COMPOSITING)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (161191 => 161192)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-01-01 18:26:29 UTC (rev 161191)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-01-01 18:34:02 UTC (rev 161192)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> Vector<WebCore::GraphicsLayer*> m_outOfTreeLayers;
</span><span class="cx">
</span><span class="cx"> Vector<RemoteLayerTreeTransaction::LayerCreationProperties> m_createdLayers;
</span><del>- Vector<RemoteLayerTreeTransaction::LayerID> m_destroyedLayers;
</del><ins>+ Vector<WebCore::GraphicsLayer::PlatformLayerID> m_destroyedLayers;
</ins><span class="cx">
</span><span class="cx"> bool m_isFlushingSuspended;
</span><span class="cx"> bool m_hasDeferredFlush;
</span></span></pre>
</div>
</div>
</body>
</html>