Modified: trunk/Source/WebCore/ChangeLog (137097 => 137098)
--- trunk/Source/WebCore/ChangeLog 2012-12-09 22:53:57 UTC (rev 137097)
+++ trunk/Source/WebCore/ChangeLog 2012-12-09 22:56:50 UTC (rev 137098)
@@ -1,3 +1,19 @@
+2012-12-09 Kondapally Kalyan <[email protected]>
+
+ [EFL] [WebGL] Path is not resized correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=104458.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface.
+ The operations done to flip the image (translation and scale) are done before rectangle with correct size
+ is added to current path. This resulted in updating pixels at wrong positions.
+
+ Covered by existing tests.
+
+ * platform/graphics/efl/GraphicsContext3DEfl.cpp:
+ (WebCore::GraphicsContext3D::paintToCanvas):
+
2012-12-09 Joone Hur <[email protected]>
[GTK][AC] build fix after r130525 and r133332
Modified: trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp (137097 => 137098)
--- trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2012-12-09 22:53:57 UTC (rev 137097)
+++ trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2012-12-09 22:56:50 UTC (rev 137098)
@@ -223,14 +223,14 @@
RefPtr<cairo_surface_t> imageSurface = adoptRef(cairo_image_surface_create_for_data(
const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageWidth, imageHeight, imageWidth * 4));
+ cairo_rectangle(cr, 0, 0, canvasWidth, canvasHeight);
+
// OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
- cairo_translate(cr, 0, imageHeight);
- cairo_scale(cr, 1, -1);
-
+ cairo_matrix_t matrix;
+ cairo_matrix_init(&matrix, 1.0, 0.0, 0.0, -1.0, 0.0, imageHeight);
+ cairo_set_matrix(cr, &matrix);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface(cr, imageSurface.get(), 0, 0);
- cairo_rectangle(cr, 0, 0, canvasWidth, -canvasHeight);
-
cairo_fill(cr);
context->restore();
}