<!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>[178033] 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/178033">178033</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2015-01-07 04:49:15 -0800 (Wed, 07 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
https://bugs.webkit.org/show_bug.cgi?id=140135

Reviewed by Darin Adler.

Source/WebCore:

Since the TextureMapperLayer member in the GraphicsLayerTextureMapper class
is always non-null, we don't need to keep it in a std::unique_ptr&lt;&gt;.

GraphicsLayerTextureMapper::layer() now returns a reference to the m_layer member.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::toTextureMapperLayerVector):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::flushCompositingState):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
(WebCore::GraphicsLayerTextureMapper::setFilters):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:

Source/WebKit/win:

GraphicsLayerTextureMapper::layer() now returns a reference,
so the call sites are updated.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::initialize):
(AcceleratedCompositingContext::startedAnimation):
(AcceleratedCompositingContext::compositeLayersToContext):

Source/WebKit2:

GraphicsLayerTextureMapper::layer() now returns a reference,
so the call sites are updated.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::compositeLayersToContext):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContextcpp">trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp">trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebCore/ChangeLog        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-01-07  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
+        https://bugs.webkit.org/show_bug.cgi?id=140135
+
+        Reviewed by Darin Adler.
+
+        Since the TextureMapperLayer member in the GraphicsLayerTextureMapper class
+        is always non-null, we don't need to keep it in a std::unique_ptr&lt;&gt;.
+
+        GraphicsLayerTextureMapper::layer() now returns a reference to the m_layer member.
+
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
+        (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
+        (WebCore::toTextureMapperLayerVector):
+        (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
+        (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
+        (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
+        (WebCore::GraphicsLayerTextureMapper::setFilters):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+
</ins><span class="cx"> 2015-01-07  Byungseon Shin  &lt;sun.shin@lge.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Border-radius clipping issue on a composited descendants
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMappercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> 
</span><span class="cx"> GraphicsLayerTextureMapper::GraphicsLayerTextureMapper(GraphicsLayerClient&amp; client)
</span><span class="cx">     : GraphicsLayer(client)
</span><del>-    , m_layer(std::make_unique&lt;TextureMapperLayer&gt;())
</del><span class="cx">     , m_compositedNativeImagePtr(0)
</span><span class="cx">     , m_changeMask(NoChanges)
</span><span class="cx">     , m_needsDisplay(false)
</span><span class="lines">@@ -368,7 +367,7 @@
</span><span class="cx"> {
</span><span class="cx">     prepareBackingStoreIfNeeded();
</span><span class="cx">     commitLayerChanges();
</span><del>-    m_layer-&gt;syncAnimations();
</del><ins>+    m_layer.syncAnimations();
</ins><span class="cx">     updateBackingStoreIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -413,7 +412,7 @@
</span><span class="cx"> {
</span><span class="cx">     texmapLayers.reserveCapacity(layers.size());
</span><span class="cx">     for (auto* layer : layers)
</span><del>-        texmapLayers.append(downcast&lt;GraphicsLayerTextureMapper&gt;(layer)-&gt;layer());
</del><ins>+        texmapLayers.append(&amp;downcast&lt;GraphicsLayerTextureMapper&gt;(layer)-&gt;layer());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerTextureMapper::commitLayerChanges()
</span><span class="lines">@@ -424,93 +423,93 @@
</span><span class="cx">     if (m_changeMask &amp; ChildrenChange) {
</span><span class="cx">         Vector&lt;TextureMapperLayer*&gt; textureMapperLayerChildren;
</span><span class="cx">         toTextureMapperLayerVector(children(), textureMapperLayerChildren);
</span><del>-        m_layer-&gt;setChildren(textureMapperLayerChildren);
</del><ins>+        m_layer.setChildren(textureMapperLayerChildren);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; MaskLayerChange)
</span><del>-        m_layer-&gt;setMaskLayer(downcast&lt;GraphicsLayerTextureMapper&gt;(maskLayer())-&gt;layer());
</del><ins>+        m_layer.setMaskLayer(&amp;downcast&lt;GraphicsLayerTextureMapper&gt;(maskLayer())-&gt;layer());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ReplicaLayerChange)
</span><del>-        m_layer-&gt;setReplicaLayer(downcast&lt;GraphicsLayerTextureMapper&gt;(replicaLayer())-&gt;layer());
</del><ins>+        m_layer.setReplicaLayer(&amp;downcast&lt;GraphicsLayerTextureMapper&gt;(replicaLayer())-&gt;layer());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; PositionChange)
</span><del>-        m_layer-&gt;setPosition(position());
</del><ins>+        m_layer.setPosition(position());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; AnchorPointChange)
</span><del>-        m_layer-&gt;setAnchorPoint(anchorPoint());
</del><ins>+        m_layer.setAnchorPoint(anchorPoint());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; SizeChange)
</span><del>-        m_layer-&gt;setSize(size());
</del><ins>+        m_layer.setSize(size());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; TransformChange)
</span><del>-        m_layer-&gt;setTransform(transform());
</del><ins>+        m_layer.setTransform(transform());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ChildrenTransformChange)
</span><del>-        m_layer-&gt;setChildrenTransform(childrenTransform());
</del><ins>+        m_layer.setChildrenTransform(childrenTransform());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; Preserves3DChange)
</span><del>-        m_layer-&gt;setPreserves3D(preserves3D());
</del><ins>+        m_layer.setPreserves3D(preserves3D());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ContentsRectChange)
</span><del>-        m_layer-&gt;setContentsRect(contentsRect());
</del><ins>+        m_layer.setContentsRect(contentsRect());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; MasksToBoundsChange)
</span><del>-        m_layer-&gt;setMasksToBounds(masksToBounds());
</del><ins>+        m_layer.setMasksToBounds(masksToBounds());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; DrawsContentChange)
</span><del>-        m_layer-&gt;setDrawsContent(drawsContent());
</del><ins>+        m_layer.setDrawsContent(drawsContent());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ContentsVisibleChange)
</span><del>-        m_layer-&gt;setContentsVisible(contentsAreVisible());
</del><ins>+        m_layer.setContentsVisible(contentsAreVisible());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ContentsOpaqueChange)
</span><del>-        m_layer-&gt;setContentsOpaque(contentsOpaque());
</del><ins>+        m_layer.setContentsOpaque(contentsOpaque());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; BackfaceVisibilityChange)
</span><del>-        m_layer-&gt;setBackfaceVisibility(backfaceVisibility());
</del><ins>+        m_layer.setBackfaceVisibility(backfaceVisibility());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; OpacityChange)
</span><del>-        m_layer-&gt;setOpacity(opacity());
</del><ins>+        m_layer.setOpacity(opacity());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; BackgroundColorChange)
</span><del>-        m_layer-&gt;setSolidColor(m_solidColor);
</del><ins>+        m_layer.setSolidColor(m_solidColor);
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; FilterChange)
</span><del>-        m_layer-&gt;setFilters(filters());
</del><ins>+        m_layer.setFilters(filters());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; BackingStoreChange)
</span><del>-        m_layer-&gt;setBackingStore(m_backingStore);
</del><ins>+        m_layer.setBackingStore(m_backingStore);
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; DebugVisualsChange)
</span><del>-        m_layer-&gt;setDebugVisuals(isShowingDebugBorder(), debugBorderColor(), debugBorderWidth(), isShowingRepaintCounter());
</del><ins>+        m_layer.setDebugVisuals(isShowingDebugBorder(), debugBorderColor(), debugBorderWidth(), isShowingRepaintCounter());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; RepaintCountChange)
</span><del>-        m_layer-&gt;setRepaintCount(repaintCount());
</del><ins>+        m_layer.setRepaintCount(repaintCount());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; ContentChange)
</span><del>-        m_layer-&gt;setContentsLayer(platformLayer());
</del><ins>+        m_layer.setContentsLayer(platformLayer());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; AnimationChange)
</span><del>-        m_layer-&gt;setAnimations(m_animations);
</del><ins>+        m_layer.setAnimations(m_animations);
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; AnimationStarted)
</span><span class="cx">         client().notifyAnimationStarted(this, &quot;&quot;, m_animationStartTime);
</span><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; FixedToViewporChange)
</span><del>-        m_layer-&gt;setFixedToViewport(fixedToViewport());
</del><ins>+        m_layer.setFixedToViewport(fixedToViewport());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; IsScrollableChange)
</span><del>-        m_layer-&gt;setIsScrollable(isScrollable());
</del><ins>+        m_layer.setIsScrollable(isScrollable());
</ins><span class="cx"> 
</span><span class="cx">     if (m_changeMask &amp; CommittedScrollOffsetChange)
</span><del>-        m_layer-&gt;didCommitScrollOffset(m_committedScrollOffset);
</del><ins>+        m_layer.didCommitScrollOffset(m_committedScrollOffset);
</ins><span class="cx"> 
</span><span class="cx">     m_changeMask = NoChanges;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerTextureMapper::flushCompositingState(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><del>-    if (!m_layer-&gt;textureMapper())
</del><ins>+    if (!m_layer.textureMapper())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     flushCompositingStateForThisLayerOnly();
</span><span class="lines">@@ -525,7 +524,7 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayerTextureMapper::updateBackingStoreIfNeeded()
</span><span class="cx"> {
</span><del>-    TextureMapper* textureMapper = m_layer-&gt;textureMapper();
</del><ins>+    TextureMapper* textureMapper = m_layer.textureMapper();
</ins><span class="cx">     if (!textureMapper)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -598,7 +597,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool GraphicsLayerTextureMapper::setFilters(const FilterOperations&amp; filters)
</span><span class="cx"> {
</span><del>-    TextureMapper* textureMapper = m_layer-&gt;textureMapper();
</del><ins>+    TextureMapper* textureMapper = m_layer.textureMapper();
</ins><span class="cx">     // TextureMapperImageBuffer does not support CSS filters.
</span><span class="cx">     if (!textureMapper || textureMapper-&gt;accelerationMode() == TextureMapper::SoftwareMode)
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -37,8 +37,8 @@
</span><span class="cx">     explicit GraphicsLayerTextureMapper(GraphicsLayerClient&amp;);
</span><span class="cx">     virtual ~GraphicsLayerTextureMapper();
</span><span class="cx"> 
</span><del>-    void setScrollClient(TextureMapperLayer::ScrollingClient* client) { m_layer-&gt;setScrollClient(client); }
-    void setID(uint32_t id) { m_layer-&gt;setID(id); }
</del><ins>+    void setScrollClient(TextureMapperLayer::ScrollingClient* client) { m_layer.setScrollClient(client); }
+    void setID(uint32_t id) { m_layer.setID(id); }
</ins><span class="cx"> 
</span><span class="cx">     // GraphicsLayer
</span><span class="cx">     virtual bool setChildren(const Vector&lt;GraphicsLayer*&gt;&amp;) override;
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     virtual void flushCompositingState(const FloatRect&amp;) override;
</span><span class="cx">     virtual void flushCompositingStateForThisLayerOnly() override;
</span><span class="cx"> 
</span><del>-    TextureMapperLayer* layer() const { return m_layer.get(); }
</del><ins>+    TextureMapperLayer&amp; layer() { return m_layer; }
</ins><span class="cx"> 
</span><span class="cx">     void didCommitScrollOffset(const IntSize&amp;);
</span><span class="cx">     void setIsScrollable(bool);
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">     };
</span><span class="cx">     void notifyChange(ChangeMask);
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;TextureMapperLayer&gt; m_layer;
</del><ins>+    TextureMapperLayer m_layer;
</ins><span class="cx">     RefPtr&lt;TextureMapperTiledBackingStore&gt; m_compositedImage;
</span><span class="cx">     NativeImagePtr m_compositedNativeImagePtr;
</span><span class="cx">     RefPtr&lt;TextureMapperBackingStore&gt; m_backingStore;
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebKit/win/ChangeLog        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-01-07  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
+        https://bugs.webkit.org/show_bug.cgi?id=140135
+
+        Reviewed by Darin Adler.
+
+        GraphicsLayerTextureMapper::layer() now returns a reference,
+        so the call sites are updated.
+
+        * WebCoreSupport/AcceleratedCompositingContext.cpp:
+        (AcceleratedCompositingContext::initialize):
+        (AcceleratedCompositingContext::startedAnimation):
+        (AcceleratedCompositingContext::compositeLayersToContext):
+
</ins><span class="cx"> 2015-01-06  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a WebKit1 database provider
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">     m_context-&gt;makeContextCurrent();
</span><span class="cx"> 
</span><span class="cx">     m_textureMapper = TextureMapperGL::create(TextureMapper::OpenGLMode);
</span><del>-    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer()-&gt;setTextureMapper(m_textureMapper.get());
</del><ins>+    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get());
</ins><span class="cx"> 
</span><span class="cx">     scheduleLayerFlush();
</span><span class="cx"> }
</span><span class="lines">@@ -141,10 +141,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool AcceleratedCompositingContext::startedAnimation(WebCore::GraphicsLayer* layer)
</span><span class="cx"> {
</span><del>-    if (!layer || !downcast&lt;GraphicsLayerTextureMapper&gt;(*layer).layer())
</del><ins>+    if (!layer)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return downcast&lt;GraphicsLayerTextureMapper&gt;(*layer).layer()-&gt;descendantsOrSelfHaveRunningAnimations();
</del><ins>+    return downcast&lt;GraphicsLayerTextureMapper&gt;(*layer).layer().descendantsOrSelfHaveRunningAnimations();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AcceleratedCompositingContext::compositeLayersToContext(CompositePurpose purpose)
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_textureMapper-&gt;beginPainting();
</span><del>-    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer()-&gt;paint();
</del><ins>+    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer().paint();
</ins><span class="cx">     m_fpsCounter.updateFPSAndDisplay(m_textureMapper.get());
</span><span class="cx">     m_textureMapper-&gt;endPainting();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebKit2/ChangeLog        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-01-07  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [TexMap] m_layer member in GraphicsLayerTextureMapper is always non-null
+        https://bugs.webkit.org/show_bug.cgi?id=140135
+
+        Reviewed by Darin Adler.
+
+        GraphicsLayerTextureMapper::layer() now returns a reference,
+        so the call sites are updated.
+
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+        (WebKit::LayerTreeHostGtk::initialize):
+        (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
+        (WebKit::LayerTreeHostGtk::compositeLayersToContext):
+
</ins><span class="cx"> 2015-01-06  Gwang Yoon Hwang  &lt;yoon@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove the remaining uses of OwnPtr in threaded compositor.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (178032 => 178033)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2015-01-07 12:12:02 UTC (rev 178032)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2015-01-07 12:49:15 UTC (rev 178033)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
</span><span class="cx">     static_cast&lt;TextureMapperGL*&gt;(m_textureMapper.get())-&gt;setEnableEdgeDistanceAntialiasing(true);
</span><del>-    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer()-&gt;setTextureMapper(m_textureMapper.get());
</del><ins>+    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Cretae page olverlay layers. https://bugs.webkit.org/show_bug.cgi?id=131433.
</span><span class="cx"> 
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx"> {
</span><span class="cx">     double fireTime = monotonicallyIncreasingTime();
</span><span class="cx">     flushAndRenderLayers();
</span><del>-    if (m_layerFlushTimerCallback.isScheduled() || !downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer()-&gt;descendantsOrSelfHaveRunningAnimations())
</del><ins>+    if (m_layerFlushTimerCallback.isScheduled() || !downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer().descendantsOrSelfHaveRunningAnimations())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     static const double targetFramerate = 1 / 60.0;
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_textureMapper-&gt;beginPainting();
</span><del>-    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer()-&gt;paint();
</del><ins>+    downcast&lt;GraphicsLayerTextureMapper&gt;(*m_rootLayer).layer().paint();
</ins><span class="cx">     m_textureMapper-&gt;endPainting();
</span><span class="cx"> 
</span><span class="cx">     context-&gt;swapBuffers();
</span></span></pre>
</div>
</div>

</body>
</html>