Changeset 137098 in webkit


Ignore:
Timestamp:
Dec 9, 2012 2:56:50 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] [WebGL] Path is not resized correctly.
https://bugs.webkit.org/show_bug.cgi?id=104458.

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2012-12-09
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r137097 r137098  
     12012-12-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
     2
     3        [EFL] [WebGL] Path is not resized correctly.
     4        https://bugs.webkit.org/show_bug.cgi?id=104458.
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface.
     9        The operations done to flip the image (translation and scale) are done before rectangle with correct size
     10        is added to current path. This resulted in updating pixels at wrong positions.
     11
     12        Covered by existing tests.
     13
     14        * platform/graphics/efl/GraphicsContext3DEfl.cpp:
     15        (WebCore::GraphicsContext3D::paintToCanvas):
     16
    1172012-12-09  Joone Hur  <joone.hur@intel.com>
    218
  • trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp

    r136942 r137098  
    224224        const_cast<unsigned char*>(imagePixels), CAIRO_FORMAT_ARGB32, imageWidth, imageHeight, imageWidth * 4));
    225225
     226    cairo_rectangle(cr, 0, 0, canvasWidth, canvasHeight);
     227
    226228    // OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
    227     cairo_translate(cr, 0, imageHeight);
    228     cairo_scale(cr, 1, -1);
    229 
     229    cairo_matrix_t matrix;
     230    cairo_matrix_init(&matrix, 1.0, 0.0, 0.0, -1.0, 0.0, imageHeight);
     231    cairo_set_matrix(cr, &matrix);
    230232    cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
    231233    cairo_set_source_surface(cr, imageSurface.get(), 0, 0);
    232     cairo_rectangle(cr, 0, 0, canvasWidth, -canvasHeight);
    233 
    234234    cairo_fill(cr);
    235235    context->restore();
Note: See TracChangeset for help on using the changeset viewer.