<!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>[168423] 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/168423">168423</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-05-07 04:44:00 -0700 (Wed, 07 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>GraphicsLayer::client() should return a reference.
https://bugs.webkit.org/show_bug.cgi?id=126372

Patch by Hyowon Kim &lt;hw1008.kim@samsung.com&gt; on 2014-05-07
Reviewed by Simon Fraser.

GraphicsLayers always have a GraphicsLayerClient attached,
so make client() a reference and remove some unnecessary branches.
The author of the changes in the mac port is Andreas Kling &lt;akling@apple.com&gt;.

Source/WebCore:
* WebCore.exp.in:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::paintGraphicsLayerContents):
(WebCore::GraphicsLayer::addRepaintRect):
(WebCore::dumpChildren):
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::client):
(WebCore::GraphicsLayer::pageScaleFactor):
(WebCore::GraphicsLayer::deviceScaleFactor):
* platform/graphics/GraphicsLayerFactory.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::computePositionRelativeToBase):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::computeVisibleRect):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
(WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
(WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::notifyChange):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::createGraphicsLayer):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit/win:
* WebView.cpp:
(WebView::setAcceleratedCompositing):

Source/WebKit2:
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::initialize):
(WebKit::PageOverlayController::installPageOverlay):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerFactoryh">trunk/Source/WebCore/platform/graphics/GraphicsLayerFactory.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMappercpp">trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh">trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorcpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorh">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebViewcpp">trunk/Source/WebKit/win/WebView.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagePageOverlayControllercpp">trunk/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp">trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/ChangeLog        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2014-05-07  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
+
+        GraphicsLayer::client() should return a reference.
+        https://bugs.webkit.org/show_bug.cgi?id=126372
+
+        Reviewed by Simon Fraser.
+
+        GraphicsLayers always have a GraphicsLayerClient attached,
+        so make client() a reference and remove some unnecessary branches.
+        The author of the changes in the mac port is Andreas Kling &lt;akling@apple.com&gt;.
+
+        * WebCore.exp.in:
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::GraphicsLayer):
+        (WebCore::GraphicsLayer::willBeDestroyed):
+        (WebCore::GraphicsLayer::paintGraphicsLayerContents):
+        (WebCore::GraphicsLayer::addRepaintRect):
+        (WebCore::dumpChildren):
+        (WebCore::GraphicsLayer::dumpProperties):
+        * platform/graphics/GraphicsLayer.h:
+        (WebCore::GraphicsLayer::client):
+        (WebCore::GraphicsLayer::pageScaleFactor):
+        (WebCore::GraphicsLayer::deviceScaleFactor):
+        * platform/graphics/GraphicsLayerFactory.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayer::create):
+        (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+        (WebCore::GraphicsLayerCA::initialize):
+        (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
+        (WebCore::GraphicsLayerCA::computePositionRelativeToBase):
+        (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
+        (WebCore::GraphicsLayerCA::computeVisibleRect):
+        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+        (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
+        (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
+        (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
+        (WebCore::GraphicsLayerCA::updateContentsOpaque):
+        (WebCore::GraphicsLayerCA::updateContentsScale):
+        (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
+        (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayer::create):
+        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
+        (WebCore::GraphicsLayerTextureMapper::notifyChange):
+        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
+        (WebCore::CompositingCoordinator::createRootLayer):
+        (WebCore::CompositingCoordinator::createGraphicsLayer):
+        * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
+        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
+        (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
+        (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::createGraphicsLayer):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
+        (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
+        (WebCore::RenderLayerCompositor::updateLayerForHeader):
+        (WebCore::RenderLayerCompositor::updateLayerForFooter):
+        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
+        (WebCore::RenderLayerCompositor::ensureRootLayer):
+
</ins><span class="cx"> 2014-05-07  Xabier Rodriguez Calvar  &lt;calvaris@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GStreamer] Corrected typo
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -282,10 +282,10 @@
</span><span class="cx"> __ZN7WebCore13GraphicsLayer18setBackgroundColorERKNS_5ColorE
</span><span class="cx"> __ZN7WebCore13GraphicsLayer20setReplicatedByLayerEPS0_
</span><span class="cx"> __ZN7WebCore13GraphicsLayer54noteDeviceOrPageScaleFactorChangedIncludingDescendantsEv
</span><del>-__ZN7WebCore13GraphicsLayer6createEPNS_20GraphicsLayerFactoryEPNS_19GraphicsLayerClientE
</del><ins>+__ZN7WebCore13GraphicsLayer6createEPNS_20GraphicsLayerFactoryERNS_19GraphicsLayerClientE
</ins><span class="cx"> __ZN7WebCore13GraphicsLayer7setSizeERKNS_9FloatSizeE
</span><span class="cx"> __ZN7WebCore13GraphicsLayer8addChildEPS0_
</span><del>-__ZN7WebCore13GraphicsLayerC2EPNS_19GraphicsLayerClientE
</del><ins>+__ZN7WebCore13GraphicsLayerC2ERNS_19GraphicsLayerClientE
</ins><span class="cx"> __ZN7WebCore13GraphicsLayerD2Ev
</span><span class="cx"> __ZN7WebCore13HTTPHeaderMapC1Ev
</span><span class="cx"> __ZN7WebCore13HTTPHeaderMapD1Ev
</span><span class="lines">@@ -584,7 +584,7 @@
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA7setNameERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA7setSizeERKNS_9FloatSizeE
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA8addChildEPNS_13GraphicsLayerE
</span><del>-__ZN7WebCore15GraphicsLayerCAC2EPNS_19GraphicsLayerClientE
</del><ins>+__ZN7WebCore15GraphicsLayerCAC2ERNS_19GraphicsLayerClientE
</ins><span class="cx"> __ZN7WebCore15GraphicsLayerCAD2Ev
</span><span class="cx"> __ZN7WebCore15HitTestLocation12rectForPointERKNS_11LayoutPointEjjjj
</span><span class="cx"> __ZN7WebCore15HitTestLocationC1ERKNS_10FloatPointE
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     m_values.append(value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
</del><ins>+GraphicsLayer::GraphicsLayer(GraphicsLayerClient&amp; client)
</ins><span class="cx">     : m_client(client)
</span><span class="cx">     , m_anchorPoint(0.5f, 0.5f, 0)
</span><span class="cx">     , m_opacity(1)
</span><span class="lines">@@ -101,8 +101,7 @@
</span><span class="cx">     , m_customBehavior(NoCustomBehavior)
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    if (m_client)
-        m_client-&gt;verifyNotPainting();
</del><ins>+    m_client.verifyNotPainting();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -115,8 +114,7 @@
</span><span class="cx"> void GraphicsLayer::willBeDestroyed()
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    if (m_client)
-        m_client-&gt;verifyNotPainting();
</del><ins>+    m_client.verifyNotPainting();
</ins><span class="cx"> #endif
</span><span class="cx">     if (m_replicaLayer)
</span><span class="cx">         m_replicaLayer-&gt;setReplicatedLayer(0);
</span><span class="lines">@@ -326,15 +324,13 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext&amp; context, const FloatRect&amp; clip)
</span><span class="cx"> {
</span><del>-    if (m_client) {
-        FloatSize offset = offsetFromRenderer();
-        context.translate(-offset);
</del><ins>+    FloatSize offset = offsetFromRenderer();
+    context.translate(-offset);
</ins><span class="cx"> 
</span><del>-        FloatRect clipRect(clip);
-        clipRect.move(offset);
</del><ins>+    FloatRect clipRect(clip);
+    clipRect.move(offset);
</ins><span class="cx"> 
</span><del>-        m_client-&gt;paintContents(this, context, m_paintingPhase, clipRect);
-    }
</del><ins>+    m_client.paintContents(this, context, m_paintingPhase, clipRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
</span><span class="lines">@@ -557,7 +553,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayer::addRepaintRect(const FloatRect&amp; repaintRect)
</span><span class="cx"> {
</span><del>-    if (m_client-&gt;isTrackingRepaints()) {
</del><ins>+    if (m_client.isTrackingRepaints()) {
</ins><span class="cx">         FloatRect largestRepaintRect(FloatPoint(), m_size);
</span><span class="cx">         largestRepaintRect.intersect(repaintRect);
</span><span class="cx">         RepaintMap::iterator repaintIt = repaintRectMap().find(this);
</span><span class="lines">@@ -592,7 +588,7 @@
</span><span class="cx"> {
</span><span class="cx">     totalChildCount += children.size();
</span><span class="cx">     for (auto* child : children) {
</span><del>-        if (!child-&gt;client()-&gt;shouldSkipLayerInDump(child)) {
</del><ins>+        if (!child-&gt;client().shouldSkipLayerInDump(child)) {
</ins><span class="cx">             child-&gt;dumpLayer(ts, indent + 2, behavior);
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="lines">@@ -651,7 +647,7 @@
</span><span class="cx">         ts &lt;&lt; &quot;(preserves3D &quot; &lt;&lt; m_preserves3D &lt;&lt; &quot;)\n&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_drawsContent &amp;&amp; m_client-&gt;shouldDumpPropertyForLayer(this, &quot;drawsContent&quot;)) {
</del><ins>+    if (m_drawsContent &amp;&amp; m_client.shouldDumpPropertyForLayer(this, &quot;drawsContent&quot;)) {
</ins><span class="cx">         writeIndent(ts, indent + 1);
</span><span class="cx">         ts &lt;&lt; &quot;(drawsContent &quot; &lt;&lt; m_drawsContent &lt;&lt; &quot;)\n&quot;;
</span><span class="cx">     }
</span><span class="lines">@@ -668,15 +664,10 @@
</span><span class="cx"> 
</span><span class="cx">     if (behavior &amp; LayerTreeAsTextDebug) {
</span><span class="cx">         writeIndent(ts, indent + 1);
</span><del>-        ts &lt;&lt; &quot;(&quot;;
-        if (m_client)
-            ts &lt;&lt; &quot;client &quot; &lt;&lt; static_cast&lt;void*&gt;(m_client);
-        else
-            ts &lt;&lt; &quot;no client&quot;;
-        ts &lt;&lt; &quot;)\n&quot;;
</del><ins>+        ts &lt;&lt; &quot;(client &quot; &lt;&lt; static_cast&lt;void*&gt;(&amp;m_client) &lt;&lt; &quot;)\n&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_backgroundColor.isValid() &amp;&amp; m_client-&gt;shouldDumpPropertyForLayer(this, &quot;backgroundColor&quot;)) {
</del><ins>+    if (m_backgroundColor.isValid() &amp;&amp; m_client.shouldDumpPropertyForLayer(this, &quot;backgroundColor&quot;)) {
</ins><span class="cx">         writeIndent(ts, indent + 1);
</span><span class="cx">         ts &lt;&lt; &quot;(backgroundColor &quot; &lt;&lt; m_backgroundColor.nameForRenderTreeAsText() &lt;&lt; &quot;)\n&quot;;
</span><span class="cx">     }
</span><span class="lines">@@ -718,7 +709,7 @@
</span><span class="cx">         ts &lt;&lt; &quot;)\n&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (behavior &amp; LayerTreeAsTextIncludeRepaintRects &amp;&amp; repaintRectMap().contains(this) &amp;&amp; !repaintRectMap().get(this).isEmpty() &amp;&amp; m_client-&gt;shouldDumpPropertyForLayer(this, &quot;repaintRects&quot;)) {
</del><ins>+    if (behavior &amp; LayerTreeAsTextIncludeRepaintRects &amp;&amp; repaintRectMap().contains(this) &amp;&amp; !repaintRectMap().get(this).isEmpty() &amp;&amp; m_client.shouldDumpPropertyForLayer(this, &quot;repaintRects&quot;)) {
</ins><span class="cx">         writeIndent(ts, indent + 1);
</span><span class="cx">         ts &lt;&lt; &quot;(repaint rects\n&quot;;
</span><span class="cx">         for (size_t i = 0; i &lt; repaintRectMap().get(this).size(); ++i) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx"> class GraphicsLayer {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(GraphicsLayer); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static std::unique_ptr&lt;GraphicsLayer&gt; create(GraphicsLayerFactory*, GraphicsLayerClient*);
</del><ins>+    static std::unique_ptr&lt;GraphicsLayer&gt; create(GraphicsLayerFactory*, GraphicsLayerClient&amp;);
</ins><span class="cx">     
</span><span class="cx">     virtual ~GraphicsLayer();
</span><span class="cx"> 
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx">     typedef uint64_t PlatformLayerID;
</span><span class="cx">     virtual PlatformLayerID primaryLayerID() const { return 0; }
</span><span class="cx"> 
</span><del>-    GraphicsLayerClient* client() const { return m_client; }
</del><ins>+    GraphicsLayerClient&amp; client() const { return m_client; }
</ins><span class="cx"> 
</span><span class="cx">     // Layer name. Only used to identify layers in debug output
</span><span class="cx">     const String&amp; name() const { return m_name; }
</span><span class="lines">@@ -464,8 +464,8 @@
</span><span class="cx">     virtual void setAppliesPageScale(bool appliesScale = true) { m_appliesPageScale = appliesScale; }
</span><span class="cx">     virtual bool appliesPageScale() const { return m_appliesPageScale; }
</span><span class="cx"> 
</span><del>-    float pageScaleFactor() const { return m_client ? m_client-&gt;pageScaleFactor() : 1; }
-    float deviceScaleFactor() const { return m_client ? m_client-&gt;deviceScaleFactor() : 1; }
</del><ins>+    float pageScaleFactor() const { return m_client.pageScaleFactor(); }
+    float deviceScaleFactor() const { return m_client.deviceScaleFactor(); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void deviceOrPageScaleFactorChanged() { }
</span><span class="cx">     void noteDeviceOrPageScaleFactorChangedIncludingDescendants();
</span><span class="lines">@@ -548,14 +548,14 @@
</span><span class="cx">     GraphicsLayer* replicatedLayer() const { return m_replicatedLayer; }
</span><span class="cx">     virtual void setReplicatedLayer(GraphicsLayer* layer) { m_replicatedLayer = layer; }
</span><span class="cx"> 
</span><del>-    GraphicsLayer(GraphicsLayerClient*);
</del><ins>+    explicit GraphicsLayer(GraphicsLayerClient&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void dumpProperties(TextStream&amp;, int indent, LayerTreeAsTextBehavior) const;
</span><span class="cx">     virtual void dumpAdditionalProperties(TextStream&amp;, int /*indent*/, LayerTreeAsTextBehavior) const { }
</span><span class="cx"> 
</span><span class="cx">     virtual void getDebugBorderInfo(Color&amp;, float&amp; width) const;
</span><span class="cx"> 
</span><del>-    GraphicsLayerClient* m_client;
</del><ins>+    GraphicsLayerClient&amp; m_client;
</ins><span class="cx">     String m_name;
</span><span class="cx">     
</span><span class="cx">     // Offset from the owning renderer
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerFactory.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayerFactory.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerFactory.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual ~GraphicsLayerFactory() { }
</span><span class="cx"> 
</span><del>-    virtual std::unique_ptr&lt;GraphicsLayer&gt; createGraphicsLayer(GraphicsLayerClient*) = 0;
</del><ins>+    virtual std::unique_ptr&lt;GraphicsLayer&gt; createGraphicsLayer(GraphicsLayerClient&amp;) = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;GraphicsLayer&gt; GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient* client)
</del><ins>+std::unique_ptr&lt;GraphicsLayer&gt; GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient&amp; client)
</ins><span class="cx"> {
</span><span class="cx">     std::unique_ptr&lt;GraphicsLayer&gt; graphicsLayer;
</span><span class="cx">     if (!factory)
</span><span class="lines">@@ -362,7 +362,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
</del><ins>+GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient&amp; client)
</ins><span class="cx">     : GraphicsLayer(client)
</span><span class="cx">     , m_contentsLayerPurpose(NoContentsLayer)
</span><span class="cx">     , m_isPageTiledBackingLayer(false)
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> void GraphicsLayerCA::initialize()
</span><span class="cx"> {
</span><span class="cx">     PlatformCALayer::LayerType layerType = PlatformCALayer::LayerTypeWebLayer;
</span><del>-    if (m_client &amp;&amp; m_client-&gt;shouldUseTiledBacking(this)) {
</del><ins>+    if (client().shouldUseTiledBacking(this)) {
</ins><span class="cx">         layerType = PlatformCALayer::LayerTypePageTiledBackingLayer;
</span><span class="cx">         m_isPageTiledBackingLayer = true;
</span><span class="cx">     }
</span><span class="lines">@@ -860,8 +860,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerCA::platformCALayerAnimationStarted(CFTimeInterval startTime)
</span><span class="cx"> {
</span><del>-    if (m_client)
-        m_client-&gt;notifyAnimationStarted(this, startTime);
</del><ins>+    client().notifyAnimationStarted(this, startTime);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerCA::setContentsToSolidColor(const Color&amp; color)
</span><span class="lines">@@ -1012,8 +1011,7 @@
</span><span class="cx">     FloatPoint offset;
</span><span class="cx">     for (const GraphicsLayer* currLayer = this; currLayer; currLayer = currLayer-&gt;parent()) {
</span><span class="cx">         if (currLayer-&gt;appliesPageScale()) {
</span><del>-            if (currLayer-&gt;client())
-                pageScale = currLayer-&gt;pageScaleFactor();
</del><ins>+            pageScale = currLayer-&gt;pageScaleFactor();
</ins><span class="cx">             return offset;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1041,8 +1039,8 @@
</span><span class="cx">     commitLayerChangesBeforeSublayers(commitState, pageScaleFactor, offset, m_visibleRect);
</span><span class="cx">     commitLayerChangesAfterSublayers(commitState);
</span><span class="cx"> 
</span><del>-    if (hadChanges &amp;&amp; client())
-        client()-&gt;didCommitChangesForLayer(this);
</del><ins>+    if (hadChanges)
+        client().didCommitChangesForLayer(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush(const TransformState&amp; state) const
</span><span class="lines">@@ -1130,12 +1128,11 @@
</span><span class="cx">     TransformState::TransformAccumulation accumulation = preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform;
</span><span class="cx"> 
</span><span class="cx">     FloatPoint position = m_position;
</span><del>-    if (client())
-        client()-&gt;customPositionForVisibleRectComputation(this, position);
</del><ins>+    client().customPositionForVisibleRectComputation(this, position);
</ins><span class="cx"> 
</span><span class="cx">     TransformationMatrix layerTransform;
</span><span class="cx">     TransformationMatrix currentTransform;
</span><del>-    if ((flags &amp; RespectAnimatingTransforms) &amp;&amp; client() &amp;&amp; client()-&gt;getCurrentTransform(this, currentTransform))
</del><ins>+    if ((flags &amp; RespectAnimatingTransforms) &amp;&amp; client().getCurrentTransform(this, currentTransform))
</ins><span class="cx">         layerTransform = this-&gt;layerTransform(position, &amp;currentTransform);
</span><span class="cx">     else
</span><span class="cx">         layerTransform = this-&gt;layerTransform(position);
</span><span class="lines">@@ -1273,11 +1270,11 @@
</span><span class="cx">         commitLayerChangesAfterSublayers(childCommitState);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (affectedByTransformAnimation &amp;&amp; client() &amp;&amp; m_layer-&gt;layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
-        client()-&gt;notifyFlushBeforeDisplayRefresh(this);
</del><ins>+    if (affectedByTransformAnimation &amp;&amp; m_layer-&gt;layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
+        client().notifyFlushBeforeDisplayRefresh(this);
</ins><span class="cx"> 
</span><del>-    if (hadChanges &amp;&amp; client())
-        client()-&gt;didCommitChangesForLayer(this);
</del><ins>+    if (hadChanges)
+        client().didCommitChangesForLayer(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsLayerCA::platformCALayerShowRepaintCounter(PlatformCALayer* platformLayer) const
</span><span class="lines">@@ -1307,21 +1304,17 @@
</span><span class="cx"> 
</span><span class="cx"> float GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const
</span><span class="cx"> {
</span><del>-    return client() ? client()-&gt;contentsScaleMultiplierForNewTiles(this) : 1;
</del><ins>+    return client().contentsScaleMultiplierForNewTiles(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const
</span><span class="cx"> {
</span><del>-    if (GraphicsLayerClient* layerClient = client())
-        return layerClient-&gt;shouldAggressivelyRetainTiles(this);
-    return false;
</del><ins>+    return client().shouldAggressivelyRetainTiles(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const
</span><span class="cx"> {
</span><del>-    if (GraphicsLayerClient* layerClient = client())
-        return layerClient-&gt;shouldTemporarilyRetainTileCohorts(this);
-    return true;
</del><ins>+    return client().shouldTemporarilyRetainTileCohorts(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState&amp; commitState, float pageScaleFactor, const FloatPoint&amp; positionRelativeToBase, const FloatRect&amp; oldVisibleRect, TransformationMatrix* transformFromRoot)
</span><span class="lines">@@ -1664,7 +1657,7 @@
</span><span class="cx">     bool contentsOpaque = m_contentsOpaque;
</span><span class="cx">     if (contentsOpaque) {
</span><span class="cx">         float contentsScale = clampedContentsScaleForScale(m_rootRelativeScaleFactor, pageScaleFactor * deviceScaleFactor());
</span><del>-        if (!isIntegral(contentsScale) &amp;&amp; !m_client-&gt;paintsOpaquelyAtNonIntegralScales(this))
</del><ins>+        if (!isIntegral(contentsScale) &amp;&amp; !m_client.paintsOpaquelyAtNonIntegralScales(this))
</ins><span class="cx">             contentsOpaque = false;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -2946,7 +2939,7 @@
</span><span class="cx">     float contentsScale = clampedContentsScaleForScale(m_rootRelativeScaleFactor, pageScaleFactor * deviceScaleFactor());
</span><span class="cx"> 
</span><span class="cx">     if (m_isPageTiledBackingLayer &amp;&amp; tiledBacking()) {
</span><del>-        float zoomedOutScale = m_client-&gt;zoomedOutPageScaleFactor() * deviceScaleFactor();
</del><ins>+        float zoomedOutScale = m_client.zoomedOutPageScaleFactor() * deviceScaleFactor();
</ins><span class="cx">         tiledBacking()-&gt;setZoomedOutContentsScale(zoomedOutScale);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3157,8 +3150,7 @@
</span><span class="cx">     // need to tell new layer to draw itself
</span><span class="cx">     setNeedsDisplay();
</span><span class="cx">     
</span><del>-    if (client())
-        client()-&gt;tiledBackingUsageChanged(this, m_usingTiledBacking);
</del><ins>+    client().tiledBackingUsageChanged(this, m_usingTiledBacking);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GraphicsLayer::CompositingCoordinatesOrientation GraphicsLayerCA::defaultContentsOrientation() const
</span><span class="lines">@@ -3503,8 +3495,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (scheduleFlush == ScheduleFlush) {
</span><span class="cx">         bool needsFlush = !hadUncommittedChanges || oldCanThrottleLayerFlush != canThrottleLayerFlush();
</span><del>-        if (needsFlush &amp;&amp; m_client)
-            m_client-&gt;notifyFlushRequired(this);
</del><ins>+        if (needsFlush)
+            client().notifyFlushRequired(this);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     // to keep the overall tile cost low.
</span><span class="cx">     static const int kTiledLayerTileSize = 512;
</span><span class="cx"> 
</span><del>-    GraphicsLayerCA(GraphicsLayerClient*);
</del><ins>+    explicit GraphicsLayerCA(GraphicsLayerClient&amp;);
</ins><span class="cx">     virtual ~GraphicsLayerCA();
</span><span class="cx"> 
</span><span class="cx">     virtual void initialize() override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMappercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     return layer ? toGraphicsLayerTextureMapper(layer)-&gt;layer() : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;GraphicsLayer&gt; GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient* client)
</del><ins>+std::unique_ptr&lt;GraphicsLayer&gt; GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient&amp; client)
</ins><span class="cx"> {
</span><span class="cx">     if (!factory)
</span><span class="cx">         return std::make_unique&lt;GraphicsLayerTextureMapper&gt;(client);
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     return factory-&gt;createGraphicsLayer(client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient* client)
</del><ins>+GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient&amp; client)
</ins><span class="cx">     : GraphicsLayer(client)
</span><span class="cx">     , m_layer(std::make_unique&lt;TextureMapperLayer&gt;())
</span><span class="cx">     , m_compositedNativeImagePtr(0)
</span><span class="lines">@@ -60,9 +60,7 @@
</span><span class="cx"> void GraphicsLayerTextureMapper::notifyChange(ChangeMask changeMask)
</span><span class="cx"> {
</span><span class="cx">     m_changeMask |= changeMask;
</span><del>-    if (!client())
-        return;
-    client()-&gt;notifyFlushRequired(this);
</del><ins>+    client().notifyFlushRequired(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerTextureMapper::setName(const String&amp; name)
</span><span class="lines">@@ -560,7 +558,7 @@
</span><span class="cx">         m_layer-&gt;setAnimations(m_animations);
</span><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; AnimationStarted)
</span><del>-        client()-&gt;notifyAnimationStarted(this, m_animationStartTime);
</del><ins>+        client().notifyAnimationStarted(this, m_animationStartTime);
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; FixedToViewporChange)
</span><span class="cx">         m_layer-&gt;setFixedToViewport(fixedToViewport());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> class GraphicsLayerTextureMapper : public GraphicsLayer, public TextureMapperPlatformLayer::Client {
</span><span class="cx"> public:
</span><del>-    explicit GraphicsLayerTextureMapper(GraphicsLayerClient*);
</del><ins>+    explicit GraphicsLayerTextureMapper(GraphicsLayerClient&amp;);
</ins><span class="cx">     virtual ~GraphicsLayerTextureMapper();
</span><span class="cx"> 
</span><span class="cx">     void setScrollClient(TextureMapperLayer::ScrollingClient* client) { m_layer-&gt;setScrollClient(client); }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_rootLayer);
</span><span class="cx">     // Create a root layer.
</span><del>-    m_rootLayer = GraphicsLayer::create(this, this);
</del><ins>+    m_rootLayer = GraphicsLayer::create(this, *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     m_rootLayer-&gt;setName(&quot;CompositingCoordinator root layer&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">     m_client-&gt;paintLayerContents(graphicsLayer, graphicsContext, enclosingIntRect(clipRect));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;GraphicsLayer&gt; CompositingCoordinator::createGraphicsLayer(GraphicsLayerClient* client)
</del><ins>+std::unique_ptr&lt;GraphicsLayer&gt; CompositingCoordinator::createGraphicsLayer(GraphicsLayerClient&amp; client)
</ins><span class="cx"> {
</span><span class="cx">     CoordinatedGraphicsLayer* layer = new CoordinatedGraphicsLayer(client);
</span><span class="cx">     layer-&gt;setCoordinator(this);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx">     virtual void removeUpdateAtlas(uint32_t atlasID) override;
</span><span class="cx"> 
</span><span class="cx">     // GraphicsLayerFactory
</span><del>-    virtual std::unique_ptr&lt;GraphicsLayer&gt; createGraphicsLayer(GraphicsLayerClient*) override;
</del><ins>+    virtual std::unique_ptr&lt;GraphicsLayer&gt; createGraphicsLayer(GraphicsLayerClient&amp;) override;
</ins><span class="cx"> 
</span><span class="cx">     void initializeRootCompositingLayerIfNeeded();
</span><span class="cx">     void flushPendingImageBackingChanges();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> bool CoordinatedGraphicsLayer::notifyFlushRequired()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_coordinator);
</span><del>-    if (client() &amp;&amp; !m_coordinator-&gt;isFlushingLayerChanges()) {
-        client()-&gt;notifyFlushRequired(this);
</del><ins>+    if (!m_coordinator-&gt;isFlushingLayerChanges()) {
+        client().notifyFlushRequired(this);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">     setShouldUpdateVisibleRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient* client)
</del><ins>+CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient&amp; client)
</ins><span class="cx">     : GraphicsLayer(client)
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     , m_isPurging(false)
</span><span class="lines">@@ -1133,7 +1133,7 @@
</span><span class="cx">     m_shouldUpdateVisibleRect = false;
</span><span class="cx">     TransformationMatrix currentTransform = transform();
</span><span class="cx">     if (m_movingVisibleRect)
</span><del>-        client()-&gt;getCurrentTransform(this, currentTransform);
</del><ins>+        client().getCurrentTransform(this, currentTransform);
</ins><span class="cx">     m_layerTransform.setLocalTransform(currentTransform);
</span><span class="cx"> 
</span><span class="cx">     m_layerTransform.setAnchorPoint(m_adjustedAnchorPoint);
</span><span class="lines">@@ -1226,7 +1226,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsLayer::animationStartedTimerFired(Timer&lt;CoordinatedGraphicsLayer&gt;*)
</span><span class="cx"> {
</span><del>-    client()-&gt;notifyAnimationStarted(this, m_lastAnimationStartTime);
</del><ins>+    client().notifyAnimationStarted(this, m_lastAnimationStartTime);
</ins><span class="cx"> }
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> #endif // USE(COORDINATED_GRAPHICS)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     , public CoordinatedImageBacking::Host
</span><span class="cx">     , public CoordinatedTileClient {
</span><span class="cx"> public:
</span><del>-    explicit CoordinatedGraphicsLayer(GraphicsLayerClient*);
</del><ins>+    explicit CoordinatedGraphicsLayer(GraphicsLayerClient&amp;);
</ins><span class="cx">     virtual ~CoordinatedGraphicsLayer();
</span><span class="cx"> 
</span><span class="cx">     // Reimplementations from GraphicsLayer.h.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     if (Page* page = renderer().frame().page())
</span><span class="cx">         graphicsLayerFactory = page-&gt;chrome().client().graphicsLayerFactory();
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;GraphicsLayer&gt; graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, this);
</del><ins>+    std::unique_ptr&lt;GraphicsLayer&gt; graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, *this);
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     graphicsLayer-&gt;setName(name);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -2904,7 +2904,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_layerForTopOverhangArea) {
</span><del>-        m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+        m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         m_layerForTopOverhangArea-&gt;setName(&quot;top overhang area&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2928,7 +2928,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_layerForBottomOverhangArea) {
</span><del>-        m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+        m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         m_layerForBottomOverhangArea-&gt;setName(&quot;bottom overhang area&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2958,7 +2958,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_layerForHeader) {
</span><del>-        m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+        m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         m_layerForHeader-&gt;setName(&quot;header&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2998,7 +2998,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_layerForFooter) {
</span><del>-        m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+        m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         m_layerForFooter-&gt;setName(&quot;footer&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3064,7 +3064,7 @@
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><span class="cx">     if (requiresOverhangAreasLayer()) {
</span><span class="cx">         if (!m_layerForOverhangAreas) {
</span><del>-            m_layerForOverhangAreas = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_layerForOverhangAreas = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_layerForOverhangAreas-&gt;setName(&quot;overhang areas&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3092,7 +3092,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (requiresContentShadowLayer()) {
</span><span class="cx">         if (!m_contentShadowLayer) {
</span><del>-            m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_contentShadowLayer-&gt;setName(&quot;content shadow&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3110,7 +3110,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (requiresHorizontalScrollbarLayer()) {
</span><span class="cx">         if (!m_layerForHorizontalScrollbar) {
</span><del>-            m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx">             m_layerForHorizontalScrollbar-&gt;setShowDebugBorder(m_showDebugBorders);
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_layerForHorizontalScrollbar-&gt;setName(&quot;horizontal scrollbar container&quot;);
</span><span class="lines">@@ -3134,7 +3134,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (requiresVerticalScrollbarLayer()) {
</span><span class="cx">         if (!m_layerForVerticalScrollbar) {
</span><del>-            m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_layerForVerticalScrollbar = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx">             m_layerForVerticalScrollbar-&gt;setShowDebugBorder(m_showDebugBorders);
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_layerForVerticalScrollbar-&gt;setName(&quot;vertical scrollbar container&quot;);
</span><span class="lines">@@ -3157,7 +3157,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (requiresScrollCornerLayer()) {
</span><span class="cx">         if (!m_layerForScrollCorner) {
</span><del>-            m_layerForScrollCorner = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_layerForScrollCorner = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx">             m_layerForScrollCorner-&gt;setShowDebugBorder(m_showDebugBorders);
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_layerForScrollCorner-&gt;setName(&quot;scroll corner&quot;);
</span><span class="lines">@@ -3182,7 +3182,7 @@
</span><span class="cx">          return;
</span><span class="cx"> 
</span><span class="cx">     if (!m_rootContentLayer) {
</span><del>-        m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+        m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         m_rootContentLayer-&gt;setName(&quot;content root&quot;);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3207,19 +3207,19 @@
</span><span class="cx">             ASSERT(!m_clipLayer);
</span><span class="cx"> 
</span><span class="cx">             // Create a layer to host the clipping layer and the overflow controls layers.
</span><del>-            m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_overflowControlsHostLayer-&gt;setName(&quot;overflow controls host&quot;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">             // Create a clipping layer if this is an iframe
</span><del>-            m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_clipLayer-&gt;setName(&quot;frame clipping&quot;);
</span><span class="cx"> #endif
</span><span class="cx">             m_clipLayer-&gt;setMasksToBounds(true);
</span><span class="cx">             
</span><del>-            m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+            m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             m_scrollLayer-&gt;setName(&quot;frame scrolling&quot;);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit/win/ChangeLog        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-05-07  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
+
+        GraphicsLayer::client() should return a reference.
+        https://bugs.webkit.org/show_bug.cgi?id=126372
+
+        Reviewed by Simon Fraser.
+
+        GraphicsLayers always have a GraphicsLayerClient attached,
+        so make client() a reference and remove some unnecessary branches.
+        The author of the changes in the mac port is Andreas Kling &lt;akling@apple.com&gt;.
+
+        * WebView.cpp:
+        (WebView::setAcceleratedCompositing):
+
</ins><span class="cx"> 2014-04-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit/win/WebView.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -6585,7 +6585,7 @@
</span><span class="cx">             // FIXME: We could perhaps get better performance by never allowing this layer to
</span><span class="cx">             // become tiled (or choosing a higher-than-normal tiling threshold).
</span><span class="cx">             // &lt;http://webkit.org/b/52603&gt;
</span><del>-            m_backingLayer = GraphicsLayer::create(0, this);
</del><ins>+            m_backingLayer = GraphicsLayer::create(0, *this);
</ins><span class="cx">             m_backingLayer-&gt;setDrawsContent(true);
</span><span class="cx">             m_backingLayer-&gt;setContentsOpaque(true);
</span><span class="cx">             RECT clientRect;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-05-07  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
+
+        GraphicsLayer::client() should return a reference.
+        https://bugs.webkit.org/show_bug.cgi?id=126372
+
+        Reviewed by Simon Fraser.
+
+        GraphicsLayers always have a GraphicsLayerClient attached,
+        so make client() a reference and remove some unnecessary branches.
+        The author of the changes in the mac port is Andreas Kling &lt;akling@apple.com&gt;.
+
+        * WebProcess/WebPage/PageOverlayController.cpp:
+        (WebKit::PageOverlayController::initialize):
+        (WebKit::PageOverlayController::installPageOverlay):
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+        (WebKit::LayerTreeHostGtk::initialize):
+        (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
+        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+        (WebKit::RemoteLayerTreeContext::createGraphicsLayer):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+
</ins><span class="cx"> 2014-05-07  Shivakumar JM  &lt;shiva.jm@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Cleanup the build from unused parameter in UIProcess Module
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagePageOverlayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx">     ASSERT(!m_documentOverlayRootLayer);
</span><span class="cx">     ASSERT(!m_viewOverlayRootLayer);
</span><span class="cx"> 
</span><del>-    m_documentOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), this);
-    m_viewOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), this);
</del><ins>+    m_documentOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), *this);
+    m_viewOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     m_documentOverlayRootLayer-&gt;setName(&quot;Page Overlay container (document-relative)&quot;);
</span><span class="cx">     m_viewOverlayRootLayer-&gt;setName(&quot;Page Overlay container (view-relative)&quot;);
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     if (fadeMode == PageOverlay::FadeMode::Fade)
</span><span class="cx">         overlay-&gt;startFadeInAnimation();
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;GraphicsLayer&gt; layer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), this);
</del><ins>+    std::unique_ptr&lt;GraphicsLayer&gt; layer = GraphicsLayer::create(m_webPage.drawingArea()-&gt;graphicsLayerFactory(), *this);
</ins><span class="cx">     layer-&gt;setAnchorPoint(FloatPoint3D());
</span><span class="cx">     layer-&gt;setBackgroundColor(overlay-&gt;backgroundColor());
</span><span class="cx">     updateOverlayGeometry(*overlay, *layer);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -93,12 +93,12 @@
</span><span class="cx"> 
</span><span class="cx"> void LayerTreeHostGtk::initialize()
</span><span class="cx"> {
</span><del>-    m_rootLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+    m_rootLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx">     m_rootLayer-&gt;setDrawsContent(false);
</span><span class="cx">     m_rootLayer-&gt;setSize(m_webPage-&gt;size());
</span><span class="cx"> 
</span><span class="cx">     // The non-composited contents are a child of the root layer.
</span><del>-    m_nonCompositedContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+    m_nonCompositedContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx">     m_nonCompositedContentLayer-&gt;setDrawsContent(true);
</span><span class="cx">     m_nonCompositedContentLayer-&gt;setContentsOpaque(m_webPage-&gt;drawsBackground() &amp;&amp; !m_webPage-&gt;drawsTransparentBackground());
</span><span class="cx">     m_nonCompositedContentLayer-&gt;setSize(m_webPage-&gt;size());
</span><span class="lines">@@ -369,7 +369,7 @@
</span><span class="cx"> 
</span><span class="cx"> void LayerTreeHostGtk::createPageOverlayLayer(PageOverlay* pageOverlay)
</span><span class="cx"> {
</span><del>-    std::unique_ptr&lt;GraphicsLayer&gt; layer = GraphicsLayer::create(graphicsLayerFactory(), this);
</del><ins>+    std::unique_ptr&lt;GraphicsLayer&gt; layer = GraphicsLayer::create(graphicsLayerFactory(), *this);
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     layer-&gt;setName(&quot;LayerTreeHost page overlay content&quot;);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> class GraphicsLayerCARemote final : public WebCore::GraphicsLayerCA {
</span><span class="cx"> public:
</span><del>-    GraphicsLayerCARemote(WebCore::GraphicsLayerClient* client, RemoteLayerTreeContext* context)
</del><ins>+    GraphicsLayerCARemote(WebCore::GraphicsLayerClient&amp; client, RemoteLayerTreeContext* context)
</ins><span class="cx">         : GraphicsLayerCA(client)
</span><span class="cx">         , m_context(context)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // WebCore::GraphicsLayerFactory
</span><del>-    virtual std::unique_ptr&lt;WebCore::GraphicsLayer&gt; createGraphicsLayer(WebCore::GraphicsLayerClient*) override;
</del><ins>+    virtual std::unique_ptr&lt;WebCore::GraphicsLayer&gt; createGraphicsLayer(WebCore::GraphicsLayerClient&amp;) override;
</ins><span class="cx"> 
</span><span class="cx">     WebPage* m_webPage;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     m_backingStoreCollection.backingStoreWillBeDestroyed(backingStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;GraphicsLayer&gt; RemoteLayerTreeContext::createGraphicsLayer(GraphicsLayerClient* client)
</del><ins>+std::unique_ptr&lt;GraphicsLayer&gt; RemoteLayerTreeContext::createGraphicsLayer(GraphicsLayerClient&amp; client)
</ins><span class="cx"> {
</span><span class="cx">     return std::make_unique&lt;GraphicsLayerCARemote&gt;(client, this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DrawingArea.h&quot;
</span><span class="cx"> #include &quot;GraphicsLayerCARemote.h&quot;
</span><ins>+#include &lt;WebCore/GraphicsLayerClient.h&gt;
</ins><span class="cx"> #include &lt;WebCore/Timer.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -39,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> class RemoteLayerTreeContext;
</span><span class="cx"> 
</span><del>-class RemoteLayerTreeDrawingArea : public DrawingArea {
</del><ins>+class RemoteLayerTreeDrawingArea : public DrawingArea, public WebCore::GraphicsLayerClient {
</ins><span class="cx"> public:
</span><span class="cx">     RemoteLayerTreeDrawingArea(WebPage*, const WebPageCreationParameters&amp;);
</span><span class="cx">     virtual ~RemoteLayerTreeDrawingArea();
</span><span class="lines">@@ -83,6 +84,11 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&amp;) override;
</span><span class="cx"> 
</span><ins>+    // GraphicsLayerClient
+    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) override { }
+    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override { }
+    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&amp;, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect&amp; inClip) override { }
+
</ins><span class="cx">     void updateScrolledExposedRect();
</span><span class="cx"> 
</span><span class="cx">     void layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt;*);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (168422 => 168423)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-05-07 11:21:21 UTC (rev 168422)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-05-07 11:44:00 UTC (rev 168423)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage* webPage, const WebPageCreationParameters&amp;)
</span><span class="cx">     : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx">     , m_remoteLayerTreeContext(std::make_unique&lt;RemoteLayerTreeContext&gt;(webPage))
</span><del>-    , m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), nullptr))
</del><ins>+    , m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), *this))
</ins><span class="cx">     , m_exposedRect(FloatRect::infiniteRect())
</span><span class="cx">     , m_scrolledExposedRect(FloatRect::infiniteRect())
</span><span class="cx">     , m_layerFlushTimer(this, &amp;RemoteLayerTreeDrawingArea::layerFlushTimerFired)
</span></span></pre>
</div>
</div>

</body>
</html>