Title: [228085] trunk/Source/WebCore
- Revision
- 228085
- Author
- zandober...@gmail.com
- Date
- 2018-02-04 23:38:08 -0800 (Sun, 04 Feb 2018)
Log Message
[Cairo] Correctly calculate stride in GraphicsContext3D::paintToCanvas()
https://bugs.webkit.org/show_bug.cgi?id=182466
Reviewed by Michael Catanzaro.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::paintToCanvas):
Use cairo_format_stride_for_width() to obtain stride that Cairo thinks
is appropriate for the given width, taking into account internal
alignment requirements.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (228084 => 228085)
--- trunk/Source/WebCore/ChangeLog 2018-02-05 07:33:44 UTC (rev 228084)
+++ trunk/Source/WebCore/ChangeLog 2018-02-05 07:38:08 UTC (rev 228085)
@@ -1,5 +1,18 @@
2018-02-04 Zan Dobersek <zdober...@igalia.com>
+ [Cairo] Correctly calculate stride in GraphicsContext3D::paintToCanvas()
+ https://bugs.webkit.org/show_bug.cgi?id=182466
+
+ Reviewed by Michael Catanzaro.
+
+ * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
+ (WebCore::GraphicsContext3D::paintToCanvas):
+ Use cairo_format_stride_for_width() to obtain stride that Cairo thinks
+ is appropriate for the given width, taking into account internal
+ alignment requirements.
+
+2018-02-04 Zan Dobersek <zdober...@igalia.com>
+
[Cairo] Split TexMap functionality out of GraphicsContext3DCairo
https://bugs.webkit.org/show_bug.cgi?id=182465
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp (228084 => 228085)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2018-02-05 07:33:44 UTC (rev 228084)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2018-02-05 07:38:08 UTC (rev 228085)
@@ -121,7 +121,8 @@
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(), imageSize.width() * 4));
+ const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageSize.width(), imageSize.height(),
+ cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, imageSize.width())));
// OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
cairo_translate(cr, 0, imageSize.height());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes