<!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>[206089] releases/WebKitGTK/webkit-2.14/Source/WebKit2</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/206089">206089</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-19 00:23:53 -0700 (Mon, 19 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/206080">r206080</a> - [GTK] Stop using glReadPixels() to blit AC surfaces in the UIProcess under Wayland
https://bugs.webkit.org/show_bug.cgi?id=161530
Reviewed by Carlos Garcia Campos.
Use gdk_cairo_draw_from_gl when all necessary conditions exist.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::create): take TextureMapper::PaintFlags as optional argument.
(WebKit::ThreadedCompositor::ThreadedCompositor): ditto.
(WebKit::ThreadedCompositor::renderLayerTree): relay paint flags to TextureMapper::beginPaint.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::paint): use the faster gdk_cairo_draw_from_gl when a new
enough GTK+ is in use.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): create compositor
with PaintingMirrored flag if we have recent GTK+ and are running under Wayland.
* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: implement shouldPaintMirrored by always
returning false.
* WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: implement shouldPaintMirrored by always
returning true.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::compositeLayersToContext): pass PaintingMirror flag to TextureMapper
when under a recent enough GTK+ and Wayland.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2ChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkAcceleratedBackingStoreWaylandcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHostcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceWaylandh">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceX11h">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp">releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit214SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-09-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ [GTK] Stop using glReadPixels() to blit AC surfaces in the UIProcess under Wayland
+ https://bugs.webkit.org/show_bug.cgi?id=161530
+
+ Reviewed by Carlos Garcia Campos.
+
+ Use gdk_cairo_draw_from_gl when all necessary conditions exist.
+
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+ (WebKit::ThreadedCompositor::create): take TextureMapper::PaintFlags as optional argument.
+ (WebKit::ThreadedCompositor::ThreadedCompositor): ditto.
+ (WebKit::ThreadedCompositor::renderLayerTree): relay paint flags to TextureMapper::beginPaint.
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+ * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
+ (WebKit::AcceleratedBackingStoreWayland::paint): use the faster gdk_cairo_draw_from_gl when a new
+ enough GTK+ is in use.
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+ (WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost): create compositor
+ with PaintingMirrored flag if we have recent GTK+ and are running under Wayland.
+ * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h: implement shouldPaintMirrored by always
+ returning false.
+ * WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h: implement shouldPaintMirrored by always
+ returning true.
+ * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+ (WebKit::LayerTreeHostGtk::compositeLayersToContext): pass PaintingMirror flag to TextureMapper
+ when under a recent enough GTK+ and Wayland.
+
</ins><span class="cx"> 2016-09-18 Michael Catanzaro <mcatanzaro@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Empty referer header after WebKit session state restoration trips Bad Behavior Wordpress plugin
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -42,15 +42,16 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync)
</del><ins>+Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new ThreadedCompositor(client, nativeSurfaceHandle, doFrameSync));
</del><ins>+ return adoptRef(*new ThreadedCompositor(client, nativeSurfaceHandle, doFrameSync, paintFlags));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-ThreadedCompositor::ThreadedCompositor(Client& client, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync)
</del><ins>+ThreadedCompositor::ThreadedCompositor(Client& client, uint64_t nativeSurfaceHandle, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
</ins><span class="cx"> : m_client(client)
</span><span class="cx"> , m_nativeSurfaceHandle(nativeSurfaceHandle)
</span><span class="cx"> , m_doFrameSync(doFrameSync)
</span><ins>+ , m_paintFlags(paintFlags)
</ins><span class="cx"> , m_compositingRunLoop(std::make_unique<CompositingRunLoop>([this] { renderLayerTree(); }))
</span><span class="cx"> {
</span><span class="cx"> m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
</span><span class="lines">@@ -196,8 +197,9 @@
</span><span class="cx"> glClearColor(0, 0, 0, 0);
</span><span class="cx"> glClear(GL_COLOR_BUFFER_BIT);
</span><span class="cx"> }
</span><del>- m_scene->paintToCurrentGLContext(viewportTransform, 1, clipRect, Color::transparent, !m_drawsBackground, m_scrollPosition);
</del><span class="cx">
</span><ins>+ m_scene->paintToCurrentGLContext(viewportTransform, 1, clipRect, Color::transparent, !m_drawsBackground, m_scrollPosition, m_paintFlags);
+
</ins><span class="cx"> m_context->swapBuffers();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "CoordinatedGraphicsScene.h"
</span><span class="cx"> #include <WebCore/GLContext.h>
</span><span class="cx"> #include <WebCore/IntSize.h>
</span><ins>+#include <WebCore/TextureMapper.h>
</ins><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/ThreadSafeRefCounted.h>
</span><span class="lines">@@ -57,7 +58,7 @@
</span><span class="cx">
</span><span class="cx"> enum class ShouldDoFrameSync { No, Yes };
</span><span class="cx">
</span><del>- static Ref<ThreadedCompositor> create(Client&, uint64_t nativeSurfaceHandle = 0, ShouldDoFrameSync = ShouldDoFrameSync::Yes);
</del><ins>+ static Ref<ThreadedCompositor> create(Client&, uint64_t nativeSurfaceHandle = 0, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0);
</ins><span class="cx"> virtual ~ThreadedCompositor();
</span><span class="cx">
</span><span class="cx"> void setNativeSurfaceHandleForCompositing(uint64_t);
</span><span class="lines">@@ -73,7 +74,7 @@
</span><span class="cx"> void forceRepaint();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- ThreadedCompositor(Client&, uint64_t nativeSurfaceHandle, ShouldDoFrameSync);
</del><ins>+ ThreadedCompositor(Client&, uint64_t nativeSurfaceHandle, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags);
</ins><span class="cx">
</span><span class="cx"> // CoordinatedGraphicsSceneClient
</span><span class="cx"> void renderNextFrame() override;
</span><span class="lines">@@ -95,6 +96,7 @@
</span><span class="cx"> bool m_drawsBackground { true };
</span><span class="cx"> uint64_t m_nativeSurfaceHandle;
</span><span class="cx"> ShouldDoFrameSync m_doFrameSync;
</span><ins>+ WebCore::TextureMapper::PaintFlags m_paintFlags { 0 };
</ins><span class="cx"> bool m_needsResize { false };
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<CompositingRunLoop> m_compositingRunLoop;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2UIProcessgtkAcceleratedBackingStoreWaylandcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -71,9 +71,8 @@
</span><span class="cx"> cairo_save(cr);
</span><span class="cx"> AcceleratedBackingStore::paint(cr, clipRect);
</span><span class="cx">
</span><del>-#if 0
- // FIXME: Use this when GTK+ >= 3.16. GTK+ expects the Y axis to be inverted to what we get, so we need to flip it somehow.
- gdk_cairo_draw_from_gl(cr, gtk_widget_get_window(m_webPage.viewWidget()), texture, GL_TEXTURE, 1, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height());
</del><ins>+#if GTK_CHECK_VERSION(3, 16, 0)
+ gdk_cairo_draw_from_gl(cr, gtk_widget_get_window(m_webPage.viewWidget()), texture, GL_TEXTURE, m_webPage.deviceScaleFactor(), 0, 0, textureSize.width(), textureSize.height());
</ins><span class="cx"> #else
</span><span class="cx"> if (!m_surface || cairo_image_surface_get_width(m_surface.get()) != textureSize.width() || cairo_image_surface_get_height(m_surface.get()) != textureSize.height())
</span><span class="cx"> m_surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, textureSize.width(), textureSize.height()));
</span><span class="lines">@@ -115,6 +114,12 @@
</span><span class="cx"> // The surface can be modified by the web process at any time, so we mark it
</span><span class="cx"> // as dirty to ensure we always render the updated contents as soon as possible.
</span><span class="cx"> cairo_surface_mark_dirty(m_surface.get());
</span><ins>+
+ // The compositor renders the texture flipped for gdk_cairo_draw_from_gl, fix that here.
+ cairo_matrix_t transform;
+ cairo_matrix_init(&transform, 1, 0, 0, -1, 0, textureSize.height() / deviceScaleFactor);
+ cairo_transform(cr, &transform);
+
</ins><span class="cx"> cairo_rectangle(cr, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height());
</span><span class="cx"> cairo_set_source_surface(cr, m_surface.get(), 0, 0);
</span><span class="cx"> cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHostcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -55,10 +55,15 @@
</span><span class="cx"> , m_surface(AcceleratedSurface::create(webPage))
</span><span class="cx"> {
</span><span class="cx"> if (m_surface) {
</span><ins>+ TextureMapper::PaintFlags paintFlags = 0;
+
+ if (m_surface->shouldPaintMirrored())
+ paintFlags |= TextureMapper::PaintingMirrored;
+
</ins><span class="cx"> // Do not do frame sync when rendering offscreen in the web process to ensure that SwapBuffers never blocks.
</span><span class="cx"> // Rendering to the actual screen will happen later anyway since the UI process schedules a redraw for every update,
</span><span class="cx"> // the compositor will take care of syncing to vblank.
</span><del>- m_compositor = ThreadedCompositor::create(m_compositorClient, m_surface->window(), ThreadedCompositor::ShouldDoFrameSync::No);
</del><ins>+ m_compositor = ThreadedCompositor::create(m_compositorClient, m_surface->window(), ThreadedCompositor::ShouldDoFrameSync::No, paintFlags);
</ins><span class="cx"> m_layerTreeContext.contextID = m_surface->surfaceID();
</span><span class="cx"> } else
</span><span class="cx"> m_compositor = ThreadedCompositor::create(m_compositorClient);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> virtual uint64_t window() const { ASSERT_NOT_REACHED(); return 0; }
</span><span class="cx"> virtual uint64_t surfaceID() const { ASSERT_NOT_REACHED(); return 0; };
</span><span class="cx"> virtual bool resize(const WebCore::IntSize&);
</span><ins>+ virtual bool shouldPaintMirrored() const { return false; }
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> AcceleratedSurface(WebPage&);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceWaylandh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.h        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> uint64_t window() const override { return reinterpret_cast<uint64_t>(m_window); }
</span><span class="cx"> uint64_t surfaceID() const override { return m_webPage.pageID(); }
</span><span class="cx"> bool resize(const WebCore::IntSize&) override;
</span><ins>+ bool shouldPaintMirrored() const override { return true; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> AcceleratedSurfaceWayland(WebPage&);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkAcceleratedSurfaceX11h"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> uint64_t window() const override { return m_window.get(); }
</span><span class="cx"> uint64_t surfaceID() const override { return m_pixmap.get(); }
</span><span class="cx"> bool resize(const WebCore::IntSize&) override;
</span><ins>+ bool shouldPaintMirrored() const override { return false; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> AcceleratedSurfaceX11(WebPage&);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKit2WebProcessWebPagegtkLayerTreeHostGtkcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (206088 => 206089)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2016-09-19 07:22:04 UTC (rev 206088)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp        2016-09-19 07:23:53 UTC (rev 206089)
</span><span class="lines">@@ -337,7 +337,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(m_textureMapper);
</span><del>- m_textureMapper->beginPainting();
</del><ins>+
+ TextureMapper::PaintFlags paintFlags = 0;
+
+ if (m_surface && m_surface->shouldPaintMirrored())
+ paintFlags |= TextureMapper::PaintingMirrored;
+
+ m_textureMapper->beginPainting(paintFlags);
</ins><span class="cx"> downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().paint();
</span><span class="cx"> m_textureMapper->endPainting();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>