<!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>[148264] trunk</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/148264">148264</a></dd>
<dt>Author</dt> <dd>zandobersek@gmail.com</dd>
<dt>Date</dt> <dd>2013-04-12 00:14:02 -0700 (Fri, 12 Apr 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/148262">r148262</a>.
http://trac.webkit.org/changeset/148262
https://bugs.webkit.org/show_bug.cgi?id=114493

Cairo dep should now build, rolling <a href="http://trac.webkit.org/projects/webkit/changeset/148247">r148247</a> back in (Requested
by zdobersek on #webkit).

Patch by Commit Queue &lt;rniwa@webkit.org&gt; on 2013-04-12

.: 

* Source/autotools/FindDependencies.m4:
* Source/autotools/PrintBuildConfiguration.m4:
* Source/autotools/SetupWebKitFeatures.m4:

Source/WebCore: 

* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/ImageBuffer.cpp:
(WebCore):
* platform/graphics/cairo/GLContext.h:
(GLContext):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore):
(WebCore::createCairoGLSurface):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::mapSurfaceToImage):
(WebCore::unmapSurfaceFromImage):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBufferData::paintToTextureMapper):
(WebCore::ImageBuffer::platformLayer):
* platform/graphics/cairo/ImageBufferDataCairo.h:
(ImageBufferData):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::~GLContextEGL):
(WebCore::GLContextEGL::cairoDevice):
(WebCore):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::GLContextGLX):
(WebCore::GLContextGLX::~GLContextGLX):
(WebCore::GLContextGLX::cairoDevice):
(WebCore):
* platform/graphics/glx/GLContextGLX.h:
(GLContextGLX):

Tools: 

* Scripts/webkitdirs.pm:
(buildAutotoolsProject):
* gtk/jhbuild.modules:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContextcpp">trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBuffercpp">trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGLContexth">trunk/Source/WebCore/platform/graphics/cairo/GLContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp">trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp">trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoImageBufferDataCairoh">trunk/Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicseglGLContextEGLcpp">trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicseglGLContextEGLh">trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsglxGLContextGLXcpp">trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsglxGLContextGLXh">trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.h</a></li>
<li><a href="#trunkSourceautotoolsFindDependenciesm4">trunk/Source/autotools/FindDependencies.m4</a></li>
<li><a href="#trunkSourceautotoolsPrintBuildConfigurationm4">trunk/Source/autotools/PrintBuildConfiguration.m4</a></li>
<li><a href="#trunkSourceautotoolsSetupWebKitFeaturesm4">trunk/Source/autotools/SetupWebKitFeatures.m4</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitdirspm">trunk/Tools/Scripts/webkitdirs.pm</a></li>
<li><a href="#trunkToolsgtkjhbuildmodules">trunk/Tools/gtk/jhbuild.modules</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/ChangeLog        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-04-12  Commit Queue  &lt;rniwa@webkit.org&gt;
+
+        Unreviewed, rolling out r148262.
+        http://trac.webkit.org/changeset/148262
+        https://bugs.webkit.org/show_bug.cgi?id=114493
+
+        Cairo dep should now build, rolling r148247 back in (Requested
+        by zdobersek on #webkit).
+
+        * Source/autotools/FindDependencies.m4:
+        * Source/autotools/PrintBuildConfiguration.m4:
+        * Source/autotools/SetupWebKitFeatures.m4:
+
</ins><span class="cx"> 2013-04-11  Commit Queue  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r148247.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/ChangeLog        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2013-04-12  Commit Queue  &lt;rniwa@webkit.org&gt;
+
+        Unreviewed, rolling out r148262.
+        http://trac.webkit.org/changeset/148262
+        https://bugs.webkit.org/show_bug.cgi?id=114493
+
+        Cairo dep should now build, rolling r148247 back in (Requested
+        by zdobersek on #webkit).
+
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore):
+        * platform/graphics/ImageBuffer.cpp:
+        (WebCore):
+        * platform/graphics/cairo/GLContext.h:
+        (GLContext):
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::isAcceleratedContext):
+        (WebCore):
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        (WebCore::ImageBufferData::ImageBufferData):
+        (WebCore):
+        (WebCore::createCairoGLSurface):
+        (WebCore::ImageBuffer::ImageBuffer):
+        (WebCore::ImageBuffer::platformTransformColorSpace):
+        (WebCore::mapSurfaceToImage):
+        (WebCore::unmapSurfaceFromImage):
+        (WebCore::getImageData):
+        (WebCore::ImageBuffer::putByteArray):
+        (WebCore::ImageBufferData::paintToTextureMapper):
+        (WebCore::ImageBuffer::platformLayer):
+        * platform/graphics/cairo/ImageBufferDataCairo.h:
+        (ImageBufferData):
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::GLContextEGL):
+        (WebCore::GLContextEGL::~GLContextEGL):
+        (WebCore::GLContextEGL::cairoDevice):
+        (WebCore):
+        * platform/graphics/egl/GLContextEGL.h:
+        * platform/graphics/glx/GLContextGLX.cpp:
+        (WebCore::GLContextGLX::GLContextGLX):
+        (WebCore::GLContextGLX::~GLContextGLX):
+        (WebCore::GLContextGLX::cairoDevice):
+        (WebCore):
+        * platform/graphics/glx/GLContextGLX.h:
+        (GLContextGLX):
+
</ins><span class="cx"> 2013-04-11  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reduce includes of CachedSVGDocument.h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -757,7 +757,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !USE(SKIA) &amp;&amp; !USE(CG)
</del><ins>+#if !USE(SKIA) &amp;&amp; !USE(CG) &amp;&amp; !USE(CAIRO)
</ins><span class="cx"> bool GraphicsContext::isAcceleratedContext() const
</span><span class="cx"> {
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     genericConvertToLuminanceMask();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(ACCELERATED_COMPOSITING) &amp;&amp; !USE(SKIA)
</del><ins>+#if USE(ACCELERATED_COMPOSITING) &amp;&amp; !USE(SKIA) &amp;&amp; !USE(CAIRO)
</ins><span class="cx"> PlatformLayer* ImageBuffer::platformLayer() const
</span><span class="cx"> {
</span><span class="cx">     return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGLContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GLContext.h (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GLContext.h        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/cairo/GLContext.h        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -25,6 +25,8 @@
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/PassOwnPtr.h&gt;
</span><span class="cx"> 
</span><ins>+typedef struct _cairo_device cairo_device_t;
+
</ins><span class="cx"> #if PLATFORM(X11)
</span><span class="cx"> typedef struct _XDisplay Display;
</span><span class="cx"> #endif
</span><span class="lines">@@ -46,6 +48,7 @@
</span><span class="cx">     virtual void waitNative() = 0;
</span><span class="cx">     virtual bool canRenderToDefaultFramebuffer() = 0;
</span><span class="cx">     virtual IntSize defaultFrameBufferSize() = 0;
</span><ins>+    virtual cairo_device_t* cairoDevice() = 0;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(X11)
</span><span class="cx">     static Display* sharedX11Display();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoGraphicsContextCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -1142,6 +1142,11 @@
</span><span class="cx">     return platformContext()-&gt;imageInterpolationQuality();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool GraphicsContext::isAcceleratedContext() const
+{
+    return cairo_surface_get_type(cairo_get_target(platformContext()-&gt;cr())) == CAIRO_SURFACE_TYPE_GL;
+}
+
</ins><span class="cx"> #if ENABLE(3D_RENDERING) &amp;&amp; USE(TEXTURE_MAPPER)
</span><span class="cx"> TransformationMatrix GraphicsContext::get3DTransform() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -44,22 +44,68 @@
</span><span class="cx"> #include &lt;wtf/text/Base64.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include &quot;GLContext.h&quot;
+#include &quot;OpenGLShims.h&quot;
+#include &quot;TextureMapperGL.h&quot;
+#include &lt;cairo-gl.h&gt;
+#endif
+
</ins><span class="cx"> using namespace std;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-ImageBufferData::ImageBufferData(const IntSize&amp;)
</del><ins>+ImageBufferData::ImageBufferData(const IntSize&amp; size)
</ins><span class="cx">     : m_platformContext(0)
</span><ins>+    , m_size(size)
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    , m_texture(0)
+#endif
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ImageBuffer::ImageBuffer(const IntSize&amp; size, float /* resolutionScale */, ColorSpace, RenderingMode, bool&amp; success)
</del><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+PassRefPtr&lt;cairo_surface_t&gt; createCairoGLSurface(const IntSize&amp; size, uint32_t&amp; texture)
+{
+    GLContext::sharingContext()-&gt;makeContextCurrent();
+
+    // We must generate the texture ourselves, because there is no Cairo API for extracting it
+    // from a pre-existing surface.
+    glGenTextures(1, &amp;texture);
+    glBindTexture(GL_TEXTURE_2D, texture);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
+    glTexImage2D(GL_TEXTURE_2D, 0 /* level */, GL_RGBA8, size.width(), size.height(), 0 /* border */, GL_RGBA, GL_UNSIGNED_BYTE, 0);
+
+    GLContext* context = GLContext::sharingContext();
+    cairo_device_t* device = context-&gt;cairoDevice();
+
+    // Thread-awareness is a huge performance hit on non-Intel drivers.
+    cairo_gl_device_set_thread_aware(device, FALSE);
+
+    return adoptRef(cairo_gl_surface_create_for_texture(device, CAIRO_CONTENT_COLOR_ALPHA, texture, size.width(), size.height()));
+}
+#endif
+
+ImageBuffer::ImageBuffer(const IntSize&amp; size, float /* resolutionScale */, ColorSpace, RenderingMode renderingMode, bool&amp; success)
</ins><span class="cx">     : m_data(size)
</span><span class="cx">     , m_size(size)
</span><span class="cx">     , m_logicalSize(size)
</span><span class="cx"> {
</span><span class="cx">     success = false;  // Make early return mean error.
</span><del>-    m_data.m_surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height()));
</del><ins>+
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    if (renderingMode == Accelerated)
+        m_data.m_surface = createCairoGLSurface(size, m_data.m_texture);
+    else
+#endif
+        m_data.m_surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height()));
+
</ins><span class="cx">     if (cairo_surface_status(m_data.m_surface.get()) != CAIRO_STATUS_SUCCESS)
</span><span class="cx">         return;  // create will notice we didn't set m_initialized and fail.
</span><span class="cx"> 
</span><span class="lines">@@ -114,7 +160,9 @@
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::platformTransformColorSpace(const Vector&lt;int&gt;&amp; lookUpTable)
</span><span class="cx"> {
</span><del>-    ASSERT(cairo_surface_get_type(m_data.m_surface.get()) == CAIRO_SURFACE_TYPE_IMAGE);
</del><ins>+    // FIXME: Enable color space conversions on accelerated canvases.
+    if (cairo_surface_get_type(m_data.m_surface.get()) != CAIRO_SURFACE_TYPE_IMAGE)
+        return;
</ins><span class="cx"> 
</span><span class="cx">     unsigned char* dataSrc = cairo_image_surface_get_data(m_data.m_surface.get());
</span><span class="cx">     int stride = cairo_image_surface_get_stride(m_data.m_surface.get());
</span><span class="lines">@@ -133,13 +181,46 @@
</span><span class="cx">     cairo_surface_mark_dirty_rectangle(m_data.m_surface.get(), 0, 0, m_size.width(), m_size.height());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static cairo_surface_t* mapSurfaceToImage(cairo_surface_t* surface, const IntSize&amp; size)
+{
+    if (cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE)
+        return surface;
+
+    cairo_surface_t* imageSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, size.width(), size.height());
+    RefPtr&lt;cairo_t&gt; cr = adoptRef(cairo_create(imageSurface));
+    cairo_set_source_surface(cr.get(), surface, 0, 0);
+    cairo_paint(cr.get());
+    return imageSurface;
+}
+
+static void unmapSurfaceFromImage(cairo_surface_t* surface, cairo_surface_t* imageSurface, const IntRect&amp; dirtyRectangle = IntRect())
+{
+    if (surface == imageSurface &amp;&amp; dirtyRectangle.isEmpty())
+        return;
+
+    if (dirtyRectangle.isEmpty()) {
+        cairo_surface_destroy(imageSurface);
+        return;
+    }
+
+    if (surface == imageSurface) {
+        cairo_surface_mark_dirty_rectangle(surface, dirtyRectangle.x(), dirtyRectangle.y(), dirtyRectangle.width(), dirtyRectangle.height());
+        return;
+    }
+
+    RefPtr&lt;cairo_t&gt; cr = adoptRef(cairo_create(surface));
+    cairo_set_source_surface(cr.get(), imageSurface, 0, 0);
+    cairo_rectangle(cr.get(), dirtyRectangle.x(), dirtyRectangle.y(), dirtyRectangle.width(), dirtyRectangle.height());
+    cairo_fill(cr.get());
+    cairo_surface_destroy(imageSurface);
+}
+
</ins><span class="cx"> template &lt;Multiply multiplied&gt;
</span><span class="cx"> PassRefPtr&lt;Uint8ClampedArray&gt; getImageData(const IntRect&amp; rect, const ImageBufferData&amp; data, const IntSize&amp; size)
</span><span class="cx"> {
</span><del>-    ASSERT(cairo_surface_get_type(data.m_surface.get()) == CAIRO_SURFACE_TYPE_IMAGE);
-
</del><span class="cx">     RefPtr&lt;Uint8ClampedArray&gt; result = Uint8ClampedArray::createUninitialized(rect.width() * rect.height() * 4);
</span><del>-    unsigned char* dataSrc = cairo_image_surface_get_data(data.m_surface.get());
</del><ins>+    cairo_surface_t* imageSurface = mapSurfaceToImage(data.m_surface.get(), size);
+    unsigned char* dataSrc = cairo_image_surface_get_data(imageSurface);
</ins><span class="cx">     unsigned char* dataDst = result-&gt;data();
</span><span class="cx"> 
</span><span class="cx">     if (rect.x() &lt; 0 || rect.y() &lt; 0 || (rect.x() + rect.width()) &gt; size.width() || (rect.y() + rect.height()) &gt; size.height())
</span><span class="lines">@@ -167,7 +248,7 @@
</span><span class="cx">         endy = size.height();
</span><span class="cx">     int numRows = endy - originy;
</span><span class="cx"> 
</span><del>-    int stride = cairo_image_surface_get_stride(data.m_surface.get());
</del><ins>+    int stride = cairo_image_surface_get_stride(imageSurface);
</ins><span class="cx">     unsigned destBytesPerRow = 4 * rect.width();
</span><span class="cx"> 
</span><span class="cx">     unsigned char* destRows = dataDst + desty * destBytesPerRow + destx * 4;
</span><span class="lines">@@ -200,6 +281,7 @@
</span><span class="cx">         destRows += destBytesPerRow;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    unmapSurfaceFromImage(data.m_surface.get(), imageSurface);
</ins><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -215,10 +297,9 @@
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::putByteArray(Multiply multiplied, Uint8ClampedArray* source, const IntSize&amp; sourceSize, const IntRect&amp; sourceRect, const IntPoint&amp; destPoint, CoordinateSystem)
</span><span class="cx"> {
</span><del>-    ASSERT(cairo_surface_get_type(m_data.m_surface.get()) == CAIRO_SURFACE_TYPE_IMAGE);
</del><ins>+    cairo_surface_t* imageSurface = mapSurfaceToImage(m_data.m_surface.get(), sourceSize);
+    unsigned char* dataDst = cairo_image_surface_get_data(imageSurface);
</ins><span class="cx"> 
</span><del>-    unsigned char* dataDst = cairo_image_surface_get_data(m_data.m_surface.get());
-
</del><span class="cx">     ASSERT(sourceRect.width() &gt; 0);
</span><span class="cx">     ASSERT(sourceRect.height() &gt; 0);
</span><span class="cx"> 
</span><span class="lines">@@ -246,7 +327,7 @@
</span><span class="cx">     int numRows = endy - desty;
</span><span class="cx"> 
</span><span class="cx">     unsigned srcBytesPerRow = 4 * sourceSize.width();
</span><del>-    int stride = cairo_image_surface_get_stride(m_data.m_surface.get());
</del><ins>+    int stride = cairo_image_surface_get_stride(imageSurface);
</ins><span class="cx"> 
</span><span class="cx">     unsigned char* srcRows = source-&gt;data() + originy * srcBytesPerRow + originx * 4;
</span><span class="cx">     for (int y = 0; y &lt; numRows; ++y) {
</span><span class="lines">@@ -274,7 +355,8 @@
</span><span class="cx">         }
</span><span class="cx">         srcRows += srcBytesPerRow;
</span><span class="cx">     }
</span><del>-    cairo_surface_mark_dirty_rectangle(m_data.m_surface.get(), destx, desty, numColumns, numRows);
</del><ins>+
+    unmapSurfaceFromImage(m_data.m_surface.get(), imageSurface, IntRect(destx, desty, numColumns, numRows));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(GTK)
</span><span class="lines">@@ -309,4 +391,32 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+void ImageBufferData::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect&amp; targetRect, const TransformationMatrix&amp; matrix, float opacity)
+{
+    if (textureMapper-&gt;accelerationMode() != TextureMapper::OpenGLMode) {
+        notImplemented();
+        return;
+    }
+
+    ASSERT(m_texture);
+
+    // Cairo may change the active context, so we make sure to change it back after flushing.
+    GLContext* previousActiveContext = GLContext::getCurrent();
+    cairo_surface_flush(m_surface.get());
+    previousActiveContext-&gt;makeContextCurrent();
+
+    static_cast&lt;TextureMapperGL*&gt;(textureMapper)-&gt;drawTexture(m_texture, TextureMapperGL::ShouldBlend, m_size, targetRect, matrix, opacity);
+}
+#endif
+
+PlatformLayer* ImageBuffer::platformLayer() const
+{
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    if (m_data.m_texture)
+        return const_cast&lt;ImageBufferData*&gt;(&amp;m_data);
+#endif
+    return 0;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoImageBufferDataCairoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -26,16 +26,31 @@
</span><span class="cx"> #include &quot;PlatformContextCairo.h&quot;
</span><span class="cx"> #include &quot;RefPtrCairo.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include &quot;TextureMapper.h&quot;
+#include &quot;TextureMapperPlatformLayer.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IntSize;
</span><span class="cx"> 
</span><del>-class ImageBufferData {
</del><ins>+class ImageBufferData
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    : public TextureMapperPlatformLayer
+#endif
+{
</ins><span class="cx"> public:
</span><span class="cx">     ImageBufferData(const IntSize&amp;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;cairo_surface_t&gt; m_surface;
</span><span class="cx">     PlatformContextCairo m_platformContext;
</span><ins>+    IntSize m_size;
+
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    virtual void paintToTextureMapper(TextureMapper*, const FloatRect&amp; target, const TransformationMatrix&amp;, float opacity);
+    uint32_t m_texture;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicseglGLContextEGLcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> #if USE(EGL)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;GraphicsContext3D.h&quot;
</span><ins>+#include &lt;cairo.h&gt;
</ins><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if USE(OPENGL_ES_2)
</span><span class="lines">@@ -31,6 +32,10 @@
</span><span class="cx"> #include &quot;OpenGLShims.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include &lt;cairo-gl.h&gt;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static EGLDisplay gSharedEGLDisplay = EGL_NO_DISPLAY;
</span><span class="lines">@@ -208,11 +213,15 @@
</span><span class="cx">     : m_context(context)
</span><span class="cx">     , m_surface(surface)
</span><span class="cx">     , m_type(type)
</span><ins>+    , m_cairoDevice(0)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GLContextEGL::~GLContextEGL()
</span><span class="cx"> {
</span><ins>+    if (m_cairoDevice)
+        cairo_device_destroy(m_cairoDevice);
+
</ins><span class="cx">     EGLDisplay display = sharedEGLDisplay();
</span><span class="cx">     if (m_context) {
</span><span class="cx">         glBindFramebuffer(GL_FRAMEBUFFER, 0);
</span><span class="lines">@@ -264,6 +273,18 @@
</span><span class="cx">     eglWaitNative(EGL_CORE_NATIVE_ENGINE);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+cairo_device_t* GLContextEGL::cairoDevice()
+{
+    if (m_cairoDevice)
+        return m_cairoDevice;
+
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    m_cairoDevice = cairo_egl_device_create(sharedEGLDisplay(), m_context);
+#endif
+
+    return m_cairoDevice;
+}
+
</ins><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> PlatformGraphicsContext3D GLContextEGL::platformContext()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicseglGLContextEGLh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx">     virtual void waitNative();
</span><span class="cx">     virtual bool canRenderToDefaultFramebuffer();
</span><span class="cx">     virtual IntSize defaultFrameBufferSize();
</span><ins>+    virtual cairo_device_t* cairoDevice();
</ins><span class="cx"> 
</span><del>-
</del><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx">     virtual PlatformGraphicsContext3D platformContext();
</span><span class="cx"> #endif
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">     EGLContext m_context;
</span><span class="cx">     EGLSurface m_surface;
</span><span class="cx">     EGLSurfaceType m_type;
</span><ins>+    cairo_device_t* m_cairoDevice;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsglxGLContextGLXcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.cpp        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -23,8 +23,13 @@
</span><span class="cx"> #include &quot;GraphicsContext3D.h&quot;
</span><span class="cx"> #include &quot;OpenGLShims.h&quot;
</span><span class="cx"> #include &lt;GL/glx.h&gt;
</span><ins>+#include &lt;cairo.h&gt;
</ins><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include &lt;cairo-gl.h&gt;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> PassOwnPtr&lt;GLContextGLX&gt; GLContextGLX::createWindowContext(XID window, GLContext* sharingContext)
</span><span class="lines">@@ -168,6 +173,7 @@
</span><span class="cx">     , m_pbuffer(0)
</span><span class="cx">     , m_pixmap(0)
</span><span class="cx">     , m_glxPixmap(0)
</span><ins>+    , m_cairoDevice(0)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -177,11 +183,15 @@
</span><span class="cx">     , m_pbuffer(0)
</span><span class="cx">     , m_pixmap(pixmap)
</span><span class="cx">     , m_glxPixmap(glxPixmap)
</span><ins>+    , m_cairoDevice(0)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GLContextGLX::~GLContextGLX()
</span><span class="cx"> {
</span><ins>+    if (m_cairoDevice)
+        cairo_device_destroy(m_cairoDevice);
+
</ins><span class="cx">     if (m_context) {
</span><span class="cx">         // This may be necessary to prevent crashes with NVidia's closed source drivers. Originally
</span><span class="cx">         // from Mozilla's 3D canvas implementation at: http://bitbucket.org/ilmari/canvas3d/
</span><span class="lines">@@ -251,6 +261,18 @@
</span><span class="cx">     glXWaitX();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+cairo_device_t* GLContextGLX::cairoDevice()
+{
+    if (m_cairoDevice)
+        return m_cairoDevice;
+
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    m_cairoDevice = cairo_glx_device_create(sharedX11Display(), m_context);
+#endif
+
+    return m_cairoDevice;
+}
+
</ins><span class="cx"> #if USE(3D_GRAPHICS)
</span><span class="cx"> PlatformGraphicsContext3D GLContextGLX::platformContext()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsglxGLContextGLXh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.h (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.h        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/WebCore/platform/graphics/glx/GLContextGLX.h        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     virtual void waitNative();
</span><span class="cx">     virtual bool canRenderToDefaultFramebuffer();
</span><span class="cx">     virtual IntSize defaultFrameBufferSize();
</span><ins>+    virtual cairo_device_t* cairoDevice();
</ins><span class="cx"> 
</span><span class="cx"> #if USE(3D_GRAPHICS)
</span><span class="cx">     virtual PlatformGraphicsContext3D platformContext();
</span><span class="lines">@@ -63,6 +64,7 @@
</span><span class="cx">     GLXPbuffer m_pbuffer;
</span><span class="cx">     Pixmap m_pixmap;
</span><span class="cx">     GLXPixmap m_glxPixmap;
</span><ins>+    cairo_device_t* m_cairoDevice;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceautotoolsFindDependenciesm4"></a>
<div class="modfile"><h4>Modified: trunk/Source/autotools/FindDependencies.m4 (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/autotools/FindDependencies.m4        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/autotools/FindDependencies.m4        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -298,6 +298,7 @@
</span><span class="cx">         enable_accelerated_compositing=&quot;no&quot;;
</span><span class="cx">     fi
</span><span class="cx"> fi
</span><ins>+
</ins><span class="cx"> if test &quot;$enable_gamepad&quot; = &quot;yes&quot; &amp;&amp; test &quot;$os_linux&quot; = no; then
</span><span class="cx">     AC_MSG_WARN([Gamepad support is only available on Linux. Disabling Gamepad support.])
</span><span class="cx">     enable_gamepad=no;
</span><span class="lines">@@ -465,6 +466,21 @@
</span><span class="cx"> fi
</span><span class="cx"> AC_SUBST([OPENGL_LIBS])
</span><span class="cx"> 
</span><ins>+enable_accelerated_canvas=no
+if test &quot;$enable_accelerated_compositing&quot; = &quot;yes&quot; &amp;&amp; test &quot;$with_acceleration_backend&quot; = &quot;opengl&quot;; then
+    CAIRO_GL_LIBS=&quot;cairo-gl&quot;
+    if test &quot;$enable_glx&quot; = &quot;yes&quot;; then
+        CAIRO_GL_LIBS+=&quot; cairo-glx&quot;
+    fi
+    if test &quot;$enable_egl&quot; = &quot;yes&quot;; then
+        CAIRO_GL_LIBS+=&quot; cairo-egl&quot;
+    fi
+
+    # At the moment CairoGL does not add any extra cflags and libraries, so we can
+    # safely ignore CAIRO_GL_LIBS and CAIRO_GL_CFLAGS for the moment.
+    PKG_CHECK_MODULES(CAIRO_GL, $CAIRO_GL_LIBS, [enable_accelerated_canvas=yes], [enable_accelerated_canvas=no])
+fi
+
</ins><span class="cx"> if test &quot;$enable_gamepad&quot; = &quot;yes&quot;; then
</span><span class="cx">     PKG_CHECK_MODULES([GAMEPAD], [gio-unix-2.0 gudev-1.0])
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceautotoolsPrintBuildConfigurationm4"></a>
<div class="modfile"><h4>Modified: trunk/Source/autotools/PrintBuildConfiguration.m4 (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/autotools/PrintBuildConfiguration.m4        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/autotools/PrintBuildConfiguration.m4        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -16,6 +16,7 @@
</span><span class="cx">  WebKit1 support                                          : $enable_webkit1
</span><span class="cx">  WebKit2 support                                          : $enable_webkit2
</span><span class="cx">  Accelerated Compositing                                  : $enable_accelerated_compositing
</span><ins>+ Accelerated 2D canvas                                    : $enable_accelerated_canvas
</ins><span class="cx">  Gamepad support                                          : $enable_gamepad
</span><span class="cx">  Geolocation support                                      : $enable_geolocation
</span><span class="cx">  HTML5 video element support                              : $enable_video
</span></span></pre></div>
<a id="trunkSourceautotoolsSetupWebKitFeaturesm4"></a>
<div class="modfile"><h4>Modified: trunk/Source/autotools/SetupWebKitFeatures.m4 (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/autotools/SetupWebKitFeatures.m4        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Source/autotools/SetupWebKitFeatures.m4        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -71,6 +71,12 @@
</span><span class="cx">     CONFIGURABLE_FEATURE_DEFINES=&quot;$CONFIGURABLE_FEATURE_DEFINES ENABLE_3D_RENDERING=0&quot;
</span><span class="cx"> fi
</span><span class="cx"> 
</span><ins>+if test &quot;$enable_accelerated_canvas&quot; = &quot;yes&quot;; then
+    CONFIGURABLE_FEATURE_DEFINES=&quot;$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=1&quot;
+else
+    CONFIGURABLE_FEATURE_DEFINES=&quot;$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=0&quot;
+fi
+
</ins><span class="cx"> if test &quot;$enable_web_audio&quot; = &quot;yes&quot;; then
</span><span class="cx">     CONFIGURABLE_FEATURE_DEFINES=&quot;$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEB_AUDIO=1&quot;
</span><span class="cx"> else
</span><span class="lines">@@ -82,7 +88,6 @@
</span><span class="cx"> # this command now rather than use AC_CONFIG_COMMANDS because automake rules depend
</span><span class="cx"> # on the output file (WebKitFeatures.txt).
</span><span class="cx"> $srcdir/Tools/gtk/generate-feature-defines-files $CONFIGURABLE_FEATURE_DEFINES \
</span><del>-    ENABLE_ACCELERATED_2D_CANVAS=0 \
</del><span class="cx">     ENABLE_BATTERY_STATUS=0 \
</span><span class="cx">     ENABLE_BLOB=1 \
</span><span class="cx">     ENABLE_CANVAS_PATH=0 \
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Tools/ChangeLog        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2013-04-12  Commit Queue  &lt;rniwa@webkit.org&gt;
+
+        Unreviewed, rolling out r148262.
+        http://trac.webkit.org/changeset/148262
+        https://bugs.webkit.org/show_bug.cgi?id=114493
+
+        Cairo dep should now build, rolling r148247 back in (Requested
+        by zdobersek on #webkit).
+
+        * Scripts/webkitdirs.pm:
+        (buildAutotoolsProject):
+        * gtk/jhbuild.modules:
+
</ins><span class="cx"> 2013-04-11  Commit Queue  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r148247.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitdirspm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitdirs.pm (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitdirs.pm        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Tools/Scripts/webkitdirs.pm        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -2119,11 +2119,18 @@
</span><span class="cx">         &quot;web-audio&quot; =&gt; 1,
</span><span class="cx">         &quot;xslt&quot; =&gt; 1,
</span><span class="cx">     );
</span><ins>+
+    # These features are ones which build-webkit cannot control, typically because
+    # they can only be active when we have the proper dependencies.
+    my %unsetFeatures = (
+        &quot;accelerated-2d-canvas&quot; =&gt; 1,
+    );
+
</ins><span class="cx">     my @overridableFeatures = ();
</span><span class="cx">     foreach (@features) {
</span><span class="cx">         if ($configurableFeatures{$_-&gt;{option}}) {
</span><span class="cx">             push @buildArgs, autotoolsFlag(${$_-&gt;{value}}, $_-&gt;{option});;
</span><del>-        } else {
</del><ins>+        } elsif (!$unsetFeatures{$_-&gt;{option}}) {
</ins><span class="cx">             push @overridableFeatures, $_-&gt;{define} . &quot;=&quot; . (${$_-&gt;{value}} ? &quot;1&quot; : &quot;0&quot;);
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkToolsgtkjhbuildmodules"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/jhbuild.modules (148263 => 148264)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/jhbuild.modules        2013-04-12 06:11:46 UTC (rev 148263)
+++ trunk/Tools/gtk/jhbuild.modules        2013-04-12 07:14:02 UTC (rev 148264)
</span><span class="lines">@@ -61,7 +61,8 @@
</span><span class="cx">     &lt;/branch&gt;
</span><span class="cx">   &lt;/autotools&gt;
</span><span class="cx"> 
</span><del>-  &lt;autotools id=&quot;cairo&quot; autogen-sh=&quot;configure&quot;&gt;
</del><ins>+  &lt;autotools id=&quot;cairo&quot; autogen-sh=&quot;configure&quot;
+             autogenargs=&quot;--enable-gl=yes --enable-egl=yes --enable-glx=yes&quot;&gt;
</ins><span class="cx">     &lt;dependencies&gt;
</span><span class="cx">       &lt;dep package=&quot;fontconfig&quot;/&gt;
</span><span class="cx">       &lt;dep package=&quot;pixman&quot;/&gt;
</span></span></pre>
</div>
</div>

</body>
</html>