<!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 <rniwa@webkit.org> 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 <rniwa@webkit.org>
+
+ 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 <rniwa@webkit.org>
</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 <rniwa@webkit.org>
+
+ 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 <ap@apple.com>
</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) && !USE(CG)
</del><ins>+#if !USE(SKIA) && !USE(CG) && !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) && !USE(SKIA)
</del><ins>+#if USE(ACCELERATED_COMPOSITING) && !USE(SKIA) && !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 <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/PassOwnPtr.h>
</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()->imageInterpolationQuality();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool GraphicsContext::isAcceleratedContext() const
+{
+ return cairo_surface_get_type(cairo_get_target(platformContext()->cr())) == CAIRO_SURFACE_TYPE_GL;
+}
+
</ins><span class="cx"> #if ENABLE(3D_RENDERING) && 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 <wtf/text/Base64.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "GLContext.h"
+#include "OpenGLShims.h"
+#include "TextureMapperGL.h"
+#include <cairo-gl.h>
+#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&)
</del><ins>+ImageBufferData::ImageBufferData(const IntSize& 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& size, float /* resolutionScale */, ColorSpace, RenderingMode, bool& success)
</del><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+PassRefPtr<cairo_surface_t> createCairoGLSurface(const IntSize& size, uint32_t& texture)
+{
+ GLContext::sharingContext()->makeContextCurrent();
+
+ // We must generate the texture ourselves, because there is no Cairo API for extracting it
+ // from a pre-existing surface.
+ glGenTextures(1, &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->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& size, float /* resolutionScale */, ColorSpace, RenderingMode renderingMode, bool& 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<int>& 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& 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<cairo_t> 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& dirtyRectangle = IntRect())
+{
+ if (surface == imageSurface && 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<cairo_t> 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 <Multiply multiplied>
</span><span class="cx"> PassRefPtr<Uint8ClampedArray> getImageData(const IntRect& rect, const ImageBufferData& data, const IntSize& 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<Uint8ClampedArray> 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->data();
</span><span class="cx">
</span><span class="cx"> if (rect.x() < 0 || rect.y() < 0 || (rect.x() + rect.width()) > size.width() || (rect.y() + rect.height()) > 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& sourceSize, const IntRect& sourceRect, const IntPoint& 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() > 0);
</span><span class="cx"> ASSERT(sourceRect.height() > 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->data() + originy * srcBytesPerRow + originx * 4;
</span><span class="cx"> for (int y = 0; y < 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& targetRect, const TransformationMatrix& matrix, float opacity)
+{
+ if (textureMapper->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->makeContextCurrent();
+
+ static_cast<TextureMapperGL*>(textureMapper)->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<ImageBufferData*>(&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 "PlatformContextCairo.h"
</span><span class="cx"> #include "RefPtrCairo.h"
</span><span class="cx">
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "TextureMapper.h"
+#include "TextureMapperPlatformLayer.h"
+#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&);
</span><span class="cx">
</span><span class="cx"> RefPtr<cairo_surface_t> 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& target, const TransformationMatrix&, 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 "GraphicsContext3D.h"
</span><ins>+#include <cairo.h>
</ins><span class="cx"> #include <wtf/OwnPtr.h>
</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 "OpenGLShims.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include <cairo-gl.h>
+#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 "GraphicsContext3D.h"
</span><span class="cx"> #include "OpenGLShims.h"
</span><span class="cx"> #include <GL/glx.h>
</span><ins>+#include <cairo.h>
</ins><span class="cx"> #include <wtf/OwnPtr.h>
</span><span class="cx">
</span><ins>+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include <cairo-gl.h>
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> PassOwnPtr<GLContextGLX> 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="no";
</span><span class="cx"> fi
</span><span class="cx"> fi
</span><ins>+
</ins><span class="cx"> if test "$enable_gamepad" = "yes" && test "$os_linux" = 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 "$enable_accelerated_compositing" = "yes" && test "$with_acceleration_backend" = "opengl"; then
+ CAIRO_GL_LIBS="cairo-gl"
+ if test "$enable_glx" = "yes"; then
+ CAIRO_GL_LIBS+=" cairo-glx"
+ fi
+ if test "$enable_egl" = "yes"; then
+ CAIRO_GL_LIBS+=" cairo-egl"
+ 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 "$enable_gamepad" = "yes"; 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="$CONFIGURABLE_FEATURE_DEFINES ENABLE_3D_RENDERING=0"
</span><span class="cx"> fi
</span><span class="cx">
</span><ins>+if test "$enable_accelerated_canvas" = "yes"; then
+ CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=1"
+else
+ CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_ACCELERATED_2D_CANVAS=0"
+fi
+
</ins><span class="cx"> if test "$enable_web_audio" = "yes"; then
</span><span class="cx"> CONFIGURABLE_FEATURE_DEFINES="$CONFIGURABLE_FEATURE_DEFINES ENABLE_WEB_AUDIO=1"
</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 <rniwa@webkit.org>
+
+ 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 <rniwa@webkit.org>
</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"> "web-audio" => 1,
</span><span class="cx"> "xslt" => 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 = (
+ "accelerated-2d-canvas" => 1,
+ );
+
</ins><span class="cx"> my @overridableFeatures = ();
</span><span class="cx"> foreach (@features) {
</span><span class="cx"> if ($configurableFeatures{$_->{option}}) {
</span><span class="cx"> push @buildArgs, autotoolsFlag(${$_->{value}}, $_->{option});;
</span><del>- } else {
</del><ins>+ } elsif (!$unsetFeatures{$_->{option}}) {
</ins><span class="cx"> push @overridableFeatures, $_->{define} . "=" . (${$_->{value}} ? "1" : "0");
</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"> </branch>
</span><span class="cx"> </autotools>
</span><span class="cx">
</span><del>- <autotools id="cairo" autogen-sh="configure">
</del><ins>+ <autotools id="cairo" autogen-sh="configure"
+ autogenargs="--enable-gl=yes --enable-egl=yes --enable-glx=yes">
</ins><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="fontconfig"/>
</span><span class="cx"> <dep package="pixman"/>
</span></span></pre>
</div>
</div>
</body>
</html>