<!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>[174830] 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/174830">174830</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-17 12:50:09 -0700 (Fri, 17 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WinCairo] Accelerated compositing is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=137345

Patch by peavo@outlook.com &lt;peavo@outlook.com&gt; on 2014-10-17
Reviewed by Brent Fulgham.

This patch is based on GTK, and the texture mapper graphics layer type.

Source/WebCore:

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
(WebCore::GraphicsLayerTextureMapper::startedAnimation):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
Otherwise glLinkProgram() will fail, and nothing will be rendered.

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKit.vcxproj: Added new accelerated compositing source files.
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Ditto.

Source/WebKit/win:

* WebCoreSupport/AcceleratedCompositingContext.cpp: Added.
(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
(WebKit::getWebViewSize):
(WebKit::AcceleratedCompositingContext::initialize):
(WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
(WebKit::AcceleratedCompositingContext::stopAnyPendingLayerFlush):
(WebKit::AcceleratedCompositingContext::enabled):
(WebKit::AcceleratedCompositingContext::prepareForRendering):
(WebKit::AcceleratedCompositingContext::startedAnimation):
(WebKit::AcceleratedCompositingContext::compositeLayersToContext):
(WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
(WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
(WebKit::AcceleratedCompositingContext::setNeedsDisplayInRect):
(WebKit::AcceleratedCompositingContext::resizeRootLayer):
(WebKit::AcceleratedCompositingContext::scrollNonCompositedContents):
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
(WebKit::AcceleratedCompositingContext::flushPendingLayerChangesSoon):
(WebKit::AcceleratedCompositingContext::flushAndRenderLayers):
(WebKit::AcceleratedCompositingContext::layerFlushTimerFired):
(WebKit::AcceleratedCompositingContext::notifyAnimationStarted):
(WebKit::AcceleratedCompositingContext::notifyFlushRequired):
(WebKit::AcceleratedCompositingContext::paintContents):
* WebCoreSupport/AcceleratedCompositingContext.h: Added.
(WebKit::AcceleratedCompositingContext::LayerFlushTimer::LayerFlushTimer):
(WebKit::AcceleratedCompositingContext::LayerFlushTimer::fired):
* WebView.cpp:
(WebView::WebView):
(WebView::addToDirtyRegion):
(WebView::scrollBackingStore):
(WebView::sizeChanged):
(WebView::paint):
(WebView::setRootChildLayer):
(WebView::flushPendingGraphicsLayerChangesSoon):
(WebView::setAcceleratedCompositing):
* WebView.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojcopyForwardingHeaderscmd">trunk/Source/WebCore/WebCore.vcxproj/copyForwardingHeaders.cmd</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="#trunkSourceWebCoreplatformgraphicstexmapTextureMapperShaderProgramcpp">trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxproj">trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj</a></li>
<li><a href="#trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxprojfilters">trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters</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="#trunkSourceWebKitwinWebViewh">trunk/Source/WebKit/win/WebView.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContextcpp">trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContexth">trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebCore/ChangeLog        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-10-17  peavo@outlook.com  &lt;peavo@outlook.com&gt;
+
+        [WinCairo] Accelerated compositing is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=137345
+
+        Reviewed by Brent Fulgham.
+
+        This patch is based on GTK, and the texture mapper graphics layer type.
+
+        * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
+        (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
+        (WebCore::GraphicsLayerTextureMapper::addAnimation):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
+        (WebCore::GraphicsLayerTextureMapper::startedAnimation):
+        * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
+        Otherwise glLinkProgram() will fail, and nothing will be rendered.
+
</ins><span class="cx"> 2014-10-17  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojcopyForwardingHeaderscmd"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/copyForwardingHeaders.cmd (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/copyForwardingHeaders.cmd        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebCore/WebCore.vcxproj/copyForwardingHeaders.cmd        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\graphics\win\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\graphics\win\%1\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\graphics\opentype\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span><ins>+xcopy /y /d &quot;%ProjectDir%..\platform\graphics\opengl\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
+xcopy /y /d &quot;%ProjectDir%..\platform\graphics\texmap\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</ins><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\mock\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\text\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span><span class="cx"> xcopy /y /d &quot;%ProjectDir%..\platform\text\icu\*.h&quot; &quot;%CONFIGURATIONBUILDDIR%\include\WebCore&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMappercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx">     , m_contentsLayer(0)
</span><span class="cx">     , m_animationStartTime(0)
</span><span class="cx">     , m_isScrollable(false)
</span><ins>+    , m_startedAnimation(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -591,6 +592,7 @@
</span><span class="cx">         m_animationStartTime = currentTime - timeOffset;
</span><span class="cx">     notifyChange(AnimationChange);
</span><span class="cx">     notifyChange(AnimationStarted);
</span><ins>+    m_startedAnimation = true;
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -100,6 +100,8 @@
</span><span class="cx">     float debugBorderWidth() const { return m_debugBorderWidth; }
</span><span class="cx">     void setRepaintCount(int);
</span><span class="cx"> 
</span><ins>+    bool startedAnimation() const { return m_startedAnimation; }
+
</ins><span class="cx"> private:
</span><span class="cx">     virtual void willBeDestroyed();
</span><span class="cx"> 
</span><span class="lines">@@ -177,6 +179,7 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize m_committedScrollOffset;
</span><span class="cx">     bool m_isScrollable;
</span><ins>+    bool m_startedAnimation;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline static GraphicsLayerTextureMapper* toGraphicsLayerTextureMapper(GraphicsLayer* layer)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapTextureMapperShaderProgramcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -208,6 +208,8 @@
</span><span class="cx">     ANTIALIASING_TEX_COORD_DIRECTIVE
</span><span class="cx">     BLUR_CONSTANTS
</span><span class="cx">     STRINGIFY(
</span><ins>+        precision highp float;
+        uniform mat4 u_textureSpaceMatrix;
</ins><span class="cx">         precision mediump float;
</span><span class="cx">         uniform SamplerType s_sampler;
</span><span class="cx">         uniform sampler2D s_contentTexture;
</span><span class="lines">@@ -220,7 +222,6 @@
</span><span class="cx">         uniform vec2 u_shadowOffset;
</span><span class="cx">         uniform vec4 u_color;
</span><span class="cx">         uniform float u_gaussianKernel[GAUSSIAN_KERNEL_HALF_WIDTH];
</span><del>-        uniform mat4 u_textureSpaceMatrix;
</del><span class="cx"> 
</span><span class="cx">         void noop(inout vec4 dummyParameter) { }
</span><span class="cx">         void noop(inout vec4 dummyParameter, vec2 texCoord) { }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/ChangeLog        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-10-17  peavo@outlook.com  &lt;peavo@outlook.com&gt;
+
+        [WinCairo] Accelerated compositing is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=137345
+
+        Reviewed by Brent Fulgham.
+
+        This patch is based on GTK, and the texture mapper graphics layer type.
+
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj: Added new accelerated compositing source files.
+        * WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Ditto.
+
</ins><span class="cx"> 2014-10-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement selection services menu for Legacy WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -323,6 +323,7 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\..\win\WebCoreStatistics.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\..\win\WebCoreSupport\AcceleratedCompositingContext.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\..\win\WebCoreSupport\EmbeddedWidget.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\..\win\WebCoreSupport\WebChromeClient.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\..\win\WebCoreSupport\WebContextMenuClient.cpp&quot; /&gt;
</span><span class="lines">@@ -460,6 +461,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCachedFramePlatformData.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCookieManager.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCoreStatistics.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\AcceleratedCompositingContext.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\EmbeddedWidget.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\WebChromeClient.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\WebContextMenuClient.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitvcxprojWebKitWebKitvcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj.filters        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -275,6 +275,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\..\win\AccessibleTextImpl.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Sources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\..\win\WebCoreSupport\AcceleratedCompositingContext.cpp&quot;&gt;
+      &lt;Filter&gt;WebCoreSupport&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\EmbeddedWidget.h&quot;&gt;
</span><span class="lines">@@ -536,6 +539,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\..\win\AccessibleTextImpl.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;Header Files&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\..\win\WebCoreSupport\AcceleratedCompositingContext.h&quot;&gt;
+      &lt;Filter&gt;WebCoreSupport&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">   &lt;/ItemGroup&gt;
</span><span class="cx">   &lt;ItemGroup&gt;
</span><span class="cx">     &lt;None Include=&quot;WebKitPostBuild.cmd&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/win/ChangeLog        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2014-10-17  peavo@outlook.com  &lt;peavo@outlook.com&gt;
+
+        [WinCairo] Accelerated compositing is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=137345
+
+        Reviewed by Brent Fulgham.
+
+        This patch is based on GTK, and the texture mapper graphics layer type.
+
+        * WebCoreSupport/AcceleratedCompositingContext.cpp: Added.
+        (WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext):
+        (WebKit::getWebViewSize):
+        (WebKit::AcceleratedCompositingContext::initialize):
+        (WebKit::AcceleratedCompositingContext::~AcceleratedCompositingContext):
+        (WebKit::AcceleratedCompositingContext::stopAnyPendingLayerFlush):
+        (WebKit::AcceleratedCompositingContext::enabled):
+        (WebKit::AcceleratedCompositingContext::prepareForRendering):
+        (WebKit::AcceleratedCompositingContext::startedAnimation):
+        (WebKit::AcceleratedCompositingContext::compositeLayersToContext):
+        (WebKit::AcceleratedCompositingContext::setRootCompositingLayer):
+        (WebKit::AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay):
+        (WebKit::AcceleratedCompositingContext::setNeedsDisplayInRect):
+        (WebKit::AcceleratedCompositingContext::resizeRootLayer):
+        (WebKit::AcceleratedCompositingContext::scrollNonCompositedContents):
+        (WebKit::AcceleratedCompositingContext::scheduleLayerFlush):
+        (WebKit::AcceleratedCompositingContext::flushPendingLayerChanges):
+        (WebKit::AcceleratedCompositingContext::flushPendingLayerChangesSoon):
+        (WebKit::AcceleratedCompositingContext::flushAndRenderLayers):
+        (WebKit::AcceleratedCompositingContext::layerFlushTimerFired):
+        (WebKit::AcceleratedCompositingContext::notifyAnimationStarted):
+        (WebKit::AcceleratedCompositingContext::notifyFlushRequired):
+        (WebKit::AcceleratedCompositingContext::paintContents):
+        * WebCoreSupport/AcceleratedCompositingContext.h: Added.
+        (WebKit::AcceleratedCompositingContext::LayerFlushTimer::LayerFlushTimer):
+        (WebKit::AcceleratedCompositingContext::LayerFlushTimer::fired):
+        * WebView.cpp:
+        (WebView::WebView):
+        (WebView::addToDirtyRegion):
+        (WebView::scrollBackingStore):
+        (WebView::sizeChanged):
+        (WebView::paint):
+        (WebView::setRootChildLayer):
+        (WebView::flushPendingGraphicsLayerChangesSoon):
+        (WebView::setAcceleratedCompositing):
+        * WebView.h:
+
</ins><span class="cx"> 2014-10-16  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r174754.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContextcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp (0 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp                                (rev 0)
+++ trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -0,0 +1,328 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;AcceleratedCompositingContext.h&quot;
+
+#if USE(TEXTURE_MAPPER_GL)
+
+#include &quot;WebView.h&quot;
+
+#include &lt;WebCore/Document.h&gt;
+#include &lt;WebCore/Frame.h&gt;
+#include &lt;WebCore/FrameView.h&gt;
+#include &lt;WebCore/GraphicsLayerTextureMapper.h&gt;
+#include &lt;WebCore/MainFrame.h&gt;
+#include &lt;WebCore/Page.h&gt;
+#include &lt;WebCore/Settings.h&gt;
+#include &lt;WebCore/TemporaryOpenGLSetting.h&gt;
+#include &lt;WebCore/TextureMapperGL.h&gt;
+#include &lt;WebCore/TextureMapperLayer.h&gt;
+
+#if USE(OPENGL_ES_2)
+#include &lt;GLES2/gl2.h&gt;
+#else
+#include &lt;GL/gl.h&gt;
+#endif
+
+using namespace WebCore;
+
+AcceleratedCompositingContext::AcceleratedCompositingContext(WebView&amp; webView)
+    : m_webView(webView)
+    , m_layerFlushTimer(*this)
+    , m_context(nullptr)
+    , m_window(0)
+{
+}
+
+static IntSize getWebViewSize(WebView&amp; webView)
+{
+    RECT r;
+    webView.frameRect(&amp;r);
+    return IntSize(r.right - r.left, r.bottom - r.top);
+}
+
+void AcceleratedCompositingContext::initialize()
+{
+    if (m_rootLayer)
+        return;
+
+    IntSize pageSize = getWebViewSize(m_webView);
+
+    m_window = m_webView.viewWindow();
+
+    if (!m_window)
+        return;
+
+    m_rootLayer = GraphicsLayer::create(nullptr, *this);
+    m_rootLayer-&gt;setDrawsContent(false);
+    m_rootLayer-&gt;setSize(pageSize);
+
+    // The non-composited contents are a child of the root layer.
+    m_nonCompositedContentLayer = GraphicsLayer::create(nullptr, *this);
+    m_nonCompositedContentLayer-&gt;setDrawsContent(true);
+    m_nonCompositedContentLayer-&gt;setContentsOpaque(!m_webView.transparent());
+    m_nonCompositedContentLayer-&gt;setSize(pageSize);
+    if (core(&amp;m_webView)-&gt;settings().acceleratedDrawingEnabled())
+        m_nonCompositedContentLayer-&gt;setAcceleratesDrawing(true);
+
+#ifndef NDEBUG
+    m_rootLayer-&gt;setName(&quot;Root layer&quot;);
+    m_nonCompositedContentLayer-&gt;setName(&quot;Non-composited content&quot;);
+#endif
+
+    m_rootLayer-&gt;addChild(m_nonCompositedContentLayer.get());
+    m_nonCompositedContentLayer-&gt;setNeedsDisplay();
+
+    // The creation of the TextureMapper needs an active OpenGL context.
+    if (!m_context)
+        m_context = GLContext::createContextForWindow(m_window, GLContext::sharingContext());
+
+    m_context-&gt;makeContextCurrent();
+
+    m_textureMapper = TextureMapperGL::create(TextureMapper::OpenGLMode);
+    static_cast&lt;TextureMapperGL*&gt;(m_textureMapper.get())-&gt;setEnableEdgeDistanceAntialiasing(true);
+    toTextureMapperLayer(m_rootLayer.get())-&gt;setTextureMapper(m_textureMapper.get());
+
+    scheduleLayerFlush();
+}
+
+AcceleratedCompositingContext::~AcceleratedCompositingContext()
+{
+    stopAnyPendingLayerFlush();
+}
+
+void AcceleratedCompositingContext::stopAnyPendingLayerFlush()
+{
+    m_layerFlushTimer.stop();
+}
+
+bool AcceleratedCompositingContext::enabled()
+{
+    return m_window &amp;&amp; m_rootLayer &amp;&amp; m_textureMapper;
+}
+
+bool AcceleratedCompositingContext::prepareForRendering()
+{
+    if (!enabled())
+        return false;
+
+    if (!m_context)
+        return false;
+
+    if (!m_context-&gt;makeContextCurrent())
+        return false;
+
+    return true;
+}
+
+bool AcceleratedCompositingContext::startedAnimation(WebCore::GraphicsLayer* layer)
+{
+    if (!layer)
+        return false;
+
+    if (toGraphicsLayerTextureMapper(layer)-&gt;startedAnimation())
+        return true;
+
+    for (auto childLayer : layer-&gt;children()) {
+        if (startedAnimation(childLayer))
+            return true;
+    }
+
+    return false;
+}
+
+void AcceleratedCompositingContext::compositeLayersToContext(CompositePurpose purpose)
+{
+    if (!prepareForRendering())
+        return;
+
+    RECT r;
+    if (!::GetClientRect(m_window, &amp;r))
+        return;
+    IntSize windowSize(r.right, r.bottom);
+    glViewport(0, 0, windowSize.width(), windowSize.height());
+
+    if (purpose == ForResize) {
+        TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
+        glClearColor(1, 1, 1, 0);
+        glClear(GL_COLOR_BUFFER_BIT);
+    }
+
+    m_textureMapper-&gt;beginPainting();
+    toTextureMapperLayer(m_rootLayer.get())-&gt;paint();
+    m_fpsCounter.updateFPSAndDisplay(m_textureMapper.get());
+    m_textureMapper-&gt;endPainting();
+
+    m_context-&gt;swapBuffers();
+}
+
+void AcceleratedCompositingContext::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
+{
+    prepareForRendering();
+
+    if (!graphicsLayer) {
+        stopAnyPendingLayerFlush();
+        m_rootLayer = nullptr;
+        m_nonCompositedContentLayer = nullptr;
+        m_textureMapper = nullptr;
+        return;
+    }
+
+    // Add the accelerated layer tree hierarchy.
+    initialize();
+    if (!m_window)
+        return;
+
+    m_nonCompositedContentLayer-&gt;removeAllChildren();
+    m_nonCompositedContentLayer-&gt;addChild(graphicsLayer);
+
+    stopAnyPendingLayerFlush();
+
+    scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay(const IntRect&amp; rect)
+{
+    if (!m_rootLayer)
+        return;
+    if (rect.isEmpty()) {
+        m_rootLayer-&gt;setNeedsDisplay();
+        return;
+    }
+    m_nonCompositedContentLayer-&gt;setNeedsDisplayInRect(rect);
+    scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::setNeedsDisplayInRect(const IntRect&amp; rect)
+{
+    if (!m_rootLayer)
+        return;
+    if (rect.isEmpty()) {
+        m_rootLayer-&gt;setNeedsDisplay();
+        return;
+    }
+    m_rootLayer-&gt;setNeedsDisplayInRect(rect);
+    scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::resizeRootLayer(const IntSize&amp; newSize)
+{
+    if (!enabled())
+        return;
+
+    if (m_rootLayer-&gt;size() == newSize)
+        return;
+
+    m_rootLayer-&gt;setSize(newSize);
+
+    // If the newSize exposes new areas of the non-composited content a setNeedsDisplay is needed
+    // for those newly exposed areas.
+    FloatSize oldSize = m_nonCompositedContentLayer-&gt;size();
+    m_nonCompositedContentLayer-&gt;setSize(newSize);
+
+    if (newSize.width() &gt; oldSize.width()) {
+        float height = std::min(static_cast&lt;float&gt;(newSize.height()), oldSize.height());
+        m_nonCompositedContentLayer-&gt;setNeedsDisplayInRect(FloatRect(oldSize.width(), 0, newSize.width() - oldSize.width(), height));
+    }
+
+    if (newSize.height() &gt; oldSize.height())
+        m_nonCompositedContentLayer-&gt;setNeedsDisplayInRect(FloatRect(0, oldSize.height(), newSize.width(), newSize.height() - oldSize.height()));
+
+    m_nonCompositedContentLayer-&gt;setNeedsDisplayInRect(IntRect(IntPoint(), newSize));
+    compositeLayersToContext(ForResize);
+    scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::scrollNonCompositedContents(const IntRect&amp; scrollRect, const IntSize&amp; /* scrollOffset */)
+{
+    m_nonCompositedContentLayer-&gt;setNeedsDisplay();
+    scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::scheduleLayerFlush()
+{
+    if (!enabled())
+        return;
+
+    if (m_layerFlushTimer.isActive())
+        return;
+
+    m_layerFlushTimer.startOneShot(0);
+}
+
+bool AcceleratedCompositingContext::flushPendingLayerChanges()
+{
+    m_rootLayer-&gt;flushCompositingStateForThisLayerOnly();
+    m_nonCompositedContentLayer-&gt;flushCompositingStateForThisLayerOnly();
+    return core(&amp;m_webView)-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
+}
+
+bool AcceleratedCompositingContext::flushPendingLayerChangesSoon()
+{
+    scheduleLayerFlush();
+    return true;
+}
+
+void AcceleratedCompositingContext::flushAndRenderLayers()
+{
+    if (!enabled())
+        return;
+
+    Frame&amp; frame = core(&amp;m_webView)-&gt;mainFrame();
+    if (!frame.contentRenderer() || !frame.view())
+        return;
+    frame.view()-&gt;updateLayoutAndStyleIfNeededRecursive();
+
+    if (!enabled())
+        return;
+
+    if (m_context &amp;&amp; !m_context-&gt;makeContextCurrent())
+        return;
+
+    if (!flushPendingLayerChanges())
+        return;
+
+    compositeLayersToContext();
+}
+
+void AcceleratedCompositingContext::layerFlushTimerFired()
+{
+    flushAndRenderLayers();
+
+    // In case an animation is running, we should flush again soon.
+    if (startedAnimation(m_rootLayer.get()))
+        scheduleLayerFlush();
+}
+
+void AcceleratedCompositingContext::paintContents(const GraphicsLayer*, GraphicsContext&amp; context, GraphicsLayerPaintingPhase, const FloatRect&amp; rectToPaint)
+{
+    context.save();
+    context.clip(rectToPaint);
+    core(&amp;m_webView)-&gt;mainFrame().view()-&gt;paint(&amp;context, enclosingIntRect(rectToPaint));
+    context.restore();
+}
+
+#endif // USE(TEXTURE_MAPPER_GL)
</ins></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportAcceleratedCompositingContexth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h (0 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h                                (rev 0)
+++ trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -0,0 +1,102 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AcceleratedCompositingContext_h
+#define AcceleratedCompositingContext_h
+
+#if USE(TEXTURE_MAPPER_GL)
+
+#include &lt;WebCore/FloatRect.h&gt;
+#include &lt;WebCore/GLContext.h&gt;
+#include &lt;WebCore/GraphicsLayer.h&gt;
+#include &lt;WebCore/GraphicsLayerClient.h&gt;
+#include &lt;WebCore/IntRect.h&gt;
+#include &lt;WebCore/IntSize.h&gt;
+#include &lt;WebCore/TextureMapperFPSCounter.h&gt;
+#include &lt;WebCore/Timer.h&gt;
+#include &lt;wtf/PassOwnPtr.h&gt;
+
+class WebView;
+
+class AcceleratedCompositingContext : public WebCore::GraphicsLayerClient {
+    WTF_MAKE_NONCOPYABLE(AcceleratedCompositingContext);
+public:
+    explicit AcceleratedCompositingContext(WebView&amp;);
+    virtual ~AcceleratedCompositingContext();
+
+    void setRootCompositingLayer(WebCore::GraphicsLayer*);
+    void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&amp;);
+    void setNeedsDisplayInRect(const WebCore::IntRect&amp;);
+    void scheduleLayerFlush();
+    void resizeRootLayer(const WebCore::IntSize&amp;);
+    bool enabled();
+
+    // GraphicsLayerClient
+    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&amp;, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect&amp; rectToPaint);
+
+    void initialize();
+
+    enum CompositePurpose { ForResize, NotForResize };
+    void compositeLayersToContext(CompositePurpose = NotForResize);
+
+    void flushAndRenderLayers();
+    bool flushPendingLayerChanges();
+    bool flushPendingLayerChangesSoon();
+    void scrollNonCompositedContents(const WebCore::IntRect&amp; scrollRect, const WebCore::IntSize&amp; scrollOffset);
+
+private:
+    WebView&amp; m_webView;
+    OwnPtr&lt;WebCore::GLContext&gt; m_context;
+    HWND m_window;
+    std::unique_ptr&lt;WebCore::GraphicsLayer&gt; m_rootLayer;
+    std::unique_ptr&lt;WebCore::GraphicsLayer&gt; m_nonCompositedContentLayer;
+    std::unique_ptr&lt;WebCore::TextureMapper&gt; m_textureMapper;
+    WebCore::TextureMapperFPSCounter m_fpsCounter;
+
+    class LayerFlushTimer : public WebCore::TimerBase {
+    public:
+        LayerFlushTimer(AcceleratedCompositingContext&amp; context)
+            : m_context(context)
+        {
+        }
+
+    private:
+        virtual void fired()
+        {
+            m_context.layerFlushTimerFired();
+        }
+
+        AcceleratedCompositingContext&amp; m_context;
+    } m_layerFlushTimer;
+
+    void layerFlushTimerFired();
+    void stopAnyPendingLayerFlush();
+    bool prepareForRendering();
+    bool startedAnimation(WebCore::GraphicsLayer*);
+};
+
+#endif // TEXTURE_MAPPER_GL
+
+#endif // AcceleratedCompositingContext_h
</ins></span></pre></div>
<a id="trunkSourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.cpp (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.cpp        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/win/WebView.cpp        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -170,6 +170,8 @@
</span><span class="cx"> #if USE(CA)
</span><span class="cx"> #include &lt;WebCore/CACFLayerTreeHost.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformCALayer.h&gt;
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+#include &quot;AcceleratedCompositingContext.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="lines">@@ -409,6 +411,9 @@
</span><span class="cx">     , m_lastSetCursor(0)
</span><span class="cx">     , m_usesLayeredWindow(false)
</span><span class="cx">     , m_needsDisplay(false)
</span><ins>+#if USE(TEXTURE_MAPPER_GL)
+    , m_acceleratedCompositingContext(nullptr)
+#endif
</ins><span class="cx"> {
</span><span class="cx">     JSC::initializeThreading();
</span><span class="cx">     WTF::initializeMainThread();
</span><span class="lines">@@ -860,7 +865,11 @@
</span><span class="cx">     // http://webkit.org/b/29350.
</span><span class="cx"> 
</span><span class="cx">     if (isAcceleratedCompositing()) {
</span><ins>+#if USE(CA)
</ins><span class="cx">         m_backingLayer-&gt;setNeedsDisplayInRect(dirtyRect);
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+        m_acceleratedCompositingContext-&gt;setNeedsDisplayInRect(dirtyRect);
+#endif
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -895,7 +904,11 @@
</span><span class="cx">     if (isAcceleratedCompositing()) {
</span><span class="cx">         // FIXME: We should be doing something smarter here, like moving tiles around and painting
</span><span class="cx">         // any newly-exposed tiles. &lt;http://webkit.org/b/52714&gt;
</span><ins>+#if USE(CA)
</ins><span class="cx">         m_backingLayer-&gt;setNeedsDisplayInRect(scrollViewRect);
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+        m_acceleratedCompositingContext-&gt;scrollNonCompositedContents(scrollViewRect, IntSize(dx, dy));
+#endif
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -952,10 +965,14 @@
</span><span class="cx"> #if USE(CA)
</span><span class="cx">     if (m_layerTreeHost)
</span><span class="cx">         m_layerTreeHost-&gt;resize();
</span><ins>+
</ins><span class="cx">     if (m_backingLayer) {
</span><span class="cx">         m_backingLayer-&gt;setSize(newSize);
</span><span class="cx">         m_backingLayer-&gt;setNeedsDisplay();
</span><span class="cx">     }
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+    if (m_acceleratedCompositingContext)
+        m_acceleratedCompositingContext-&gt;resizeRootLayer(newSize);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1084,18 +1101,22 @@
</span><span class="cx"> {
</span><span class="cx">     LOCAL_GDI_COUNTER(0, __FUNCTION__);
</span><span class="cx"> 
</span><ins>+    if (isAcceleratedCompositing() &amp;&amp; !usesLayeredWindow()) {
</ins><span class="cx"> #if USE(CA)
</span><del>-    if (isAcceleratedCompositing() &amp;&amp; !usesLayeredWindow()) {
</del><span class="cx">         m_layerTreeHost-&gt;flushPendingLayerChangesNow();
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+        m_acceleratedCompositingContext-&gt;flushAndRenderLayers();
+#endif
</ins><span class="cx">         // Flushing might have taken us out of compositing mode.
</span><span class="cx">         if (isAcceleratedCompositing()) {
</span><ins>+#if USE(CA)
</ins><span class="cx">             // FIXME: We need to paint into dc (if provided). &lt;http://webkit.org/b/52578&gt;
</span><span class="cx">             m_layerTreeHost-&gt;paint();
</span><ins>+#endif
</ins><span class="cx">             ::ValidateRect(m_viewWindow, 0);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx">     Frame* coreFrame = core(m_mainFrame);
</span><span class="cx">     if (!coreFrame)
</span><span class="lines">@@ -2393,8 +2414,10 @@
</span><span class="cx">                 RECT windowRect;
</span><span class="cx">                 ::GetClientRect(hWnd, &amp;windowRect);
</span><span class="cx">                 ::InvalidateRect(hWnd, &amp;windowRect, false);
</span><ins>+#if USE(CA)
</ins><span class="cx">                 if (webView-&gt;isAcceleratedCompositing())
</span><span class="cx">                     webView-&gt;m_backingLayer-&gt;setNeedsDisplay();
</span><ins>+#endif
</ins><span class="cx">            }
</span><span class="cx">             break;
</span><span class="cx">         case WM_MOUSEACTIVATE:
</span><span class="lines">@@ -6551,9 +6574,15 @@
</span><span class="cx"> void WebView::setRootChildLayer(GraphicsLayer* layer)
</span><span class="cx"> {
</span><span class="cx">     setAcceleratedCompositing(layer ? true : false);
</span><ins>+#if USE(CA)
</ins><span class="cx">     if (!m_backingLayer)
</span><span class="cx">         return;
</span><span class="cx">     m_backingLayer-&gt;addChild(layer);
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+    if (!m_acceleratedCompositingContext)
+        return;
+    m_acceleratedCompositingContext-&gt;setRootCompositingLayer(layer);
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebView::flushPendingGraphicsLayerChangesSoon()
</span><span class="lines">@@ -6562,13 +6591,20 @@
</span><span class="cx">     if (!m_layerTreeHost)
</span><span class="cx">         return;
</span><span class="cx">     m_layerTreeHost-&gt;flushPendingGraphicsLayerChangesSoon();
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+    if (!m_acceleratedCompositingContext)
+        return;
+    m_acceleratedCompositingContext-&gt;flushPendingLayerChangesSoon();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebView::setAcceleratedCompositing(bool accelerated)
</span><span class="cx"> {
</span><ins>+    if (m_isAcceleratedCompositing == accelerated)
+        return;
+
</ins><span class="cx"> #if USE(CA)
</span><del>-    if (m_isAcceleratedCompositing == accelerated || !CACFLayerTreeHost::acceleratedCompositingAvailable())
</del><ins>+    if (!CACFLayerTreeHost::acceleratedCompositingAvailable())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (accelerated) {
</span><span class="lines">@@ -6608,6 +6644,10 @@
</span><span class="cx">         m_backingLayer = nullptr;
</span><span class="cx">         m_isAcceleratedCompositing = false;
</span><span class="cx">     }
</span><ins>+#elif USE(TEXTURE_MAPPER_GL)
+    if (accelerated &amp;&amp; !m_acceleratedCompositingContext)
+        m_acceleratedCompositingContext = std::make_unique&lt;AcceleratedCompositingContext&gt;(*this);
+    m_isAcceleratedCompositing = accelerated;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -6752,14 +6792,18 @@
</span><span class="cx">     FrameView* view = coreFrame-&gt;view();
</span><span class="cx">     if (!view)
</span><span class="cx">         return;
</span><ins>+#if USE(CA)
</ins><span class="cx">     if (!m_backingLayer)
</span><span class="cx">         return;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     view-&gt;updateLayoutAndStyleIfNeededRecursive();
</span><span class="cx"> 
</span><ins>+#if USE(CA)
</ins><span class="cx">     // Updating layout might have taken us out of compositing mode.
</span><span class="cx">     if (m_backingLayer)
</span><span class="cx">         m_backingLayer-&gt;flushCompositingStateForThisLayerOnly();
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     view-&gt;flushCompositingStateIncludingSubframes();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebView.h (174829 => 174830)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebView.h        2014-10-17 19:21:01 UTC (rev 174829)
+++ trunk/Source/WebKit/win/WebView.h        2014-10-17 19:50:09 UTC (rev 174830)
</span><span class="lines">@@ -67,6 +67,9 @@
</span><span class="cx"> class WebFrame;
</span><span class="cx"> class WebInspector;
</span><span class="cx"> class WebInspectorClient;
</span><ins>+#if USE(TEXTURE_MAPPER_GL)
+class AcceleratedCompositingContext;
+#endif
</ins><span class="cx"> 
</span><span class="cx"> WebView* kit(WebCore::Page*);
</span><span class="cx"> WebCore::Page* core(IWebView*);
</span><span class="lines">@@ -1136,8 +1139,10 @@
</span><span class="cx">     void setAcceleratedCompositing(bool);
</span><span class="cx"> #if USE(CA)
</span><span class="cx">     RefPtr&lt;WebCore::CACFLayerTreeHost&gt; m_layerTreeHost;
</span><ins>+    std::unique_ptr&lt;WebCore::GraphicsLayer&gt; m_backingLayer;
+#elif USE(TEXTURE_MAPPER_GL)
+    std::unique_ptr&lt;AcceleratedCompositingContext&gt; m_acceleratedCompositingContext;
</ins><span class="cx"> #endif
</span><del>-    std::unique_ptr&lt;WebCore::GraphicsLayer&gt; m_backingLayer;
</del><span class="cx">     bool m_isAcceleratedCompositing;
</span><span class="cx"> 
</span><span class="cx">     bool m_nextDisplayIsSynchronous;
</span></span></pre>
</div>
</div>

</body>
</html>