Unreviewed, rolling out r228085.
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 10:18:51 +0000 (10:18 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Feb 2018 10:18:51 +0000 (10:18 +0000)
Pixel data stride is imposed by OpenGL and shouldn't be
adjusted for Cairo

Reverted changeset:

"[Cairo] Correctly calculate stride in
GraphicsContext3D::paintToCanvas()"
https://bugs.webkit.org/show_bug.cgi?id=182466
https://trac.webkit.org/changeset/228085

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228091 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp

index 25f6d58..0d86aa3 100644 (file)
@@ -1,3 +1,17 @@
+2018-02-05  Zan Dobersek  <zdobersek@igalia.com>
+
+        Unreviewed, rolling out r228085.
+
+        Pixel data stride is imposed by OpenGL and shouldn't be
+        adjusted for Cairo
+
+        Reverted changeset:
+
+        "[Cairo] Correctly calculate stride in
+        GraphicsContext3D::paintToCanvas()"
+        https://bugs.webkit.org/show_bug.cgi?id=182466
+        https://trac.webkit.org/changeset/228085
+
 2018-02-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [SOUP] WebSockets must use system proxy settings
index 89f34e0..ca8e4f8 100644 (file)
@@ -121,8 +121,7 @@ void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, const In
     cairo_paint(cr);
 
     RefPtr<cairo_surface_t> imageSurface = adoptRef(cairo_image_surface_create_for_data(
-        const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageSize.width(), imageSize.height(),
-        cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, imageSize.width())));
+        const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageSize.width(), imageSize.height(), imageSize.width() * 4));
 
     // OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
     cairo_translate(cr, 0, imageSize.height());