WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
15721
[CAIRO] Image transformations are broken
https://bugs.webkit.org/show_bug.cgi?id=15721
Summary
[CAIRO] Image transformations are broken
Alp Toker
Reported
2007-10-27 01:34:40 PDT
The transformed images at
http://www.netzgesta.de/reflex/
do not render properly. The culprit is probably incorrect pattern usage in the ImageCairo tiled drawing functions.
Attachments
CompositeOperator
(1.36 KB, patch)
2008-06-16 14:23 PDT
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kalle Vahlman
Comment 1
2008-06-10 09:36:06 PDT
This seems fixed by now, probably should close this one...
Dirk Schulze
Comment 2
2008-06-15 13:07:22 PDT
(In reply to
comment #1
)
> This seems fixed by now, probably should close this one...
What about the backgrounds? They are all black. Some reflections are rendered wrong (Reflections are missing if a image is transformed and the reflection is translated).
Dirk Schulze
Comment 3
2008-06-16 07:53:06 PDT
The black background is a problem of the CompositeOperator. If you hardcode the CompositeOperator, the background is transparent: - if (op == CompositeSourceOver && !frameHasAlphaAtIndex(m_currentFrame)) - context->setCompositeOperation(CompositeCopy); - else - context->setCompositeOperation(op); + cairo_set_operator(cr, CAIRO_OPERATOR_OVER); For every single step the background is transparent. Only the last operation takes a wrong CompositeOperator. Thats why the background is black.
Dirk Schulze
Comment 4
2008-06-16 14:23:43 PDT
Created
attachment 21745
[details]
CompositeOperator Is the if-clause in ImageCairo.cpp still necessary? if (op == CompositeSourceOver && !frameHasAlphaAtIndex(m_currentFrame)) context->setCompositeOperation(CompositeCopy); else context->setCompositeOperation(op); Other implementations don't change the CompositeOperator. And in this case it causes the black background. Why is it there?
Dirk Schulze
Comment 5
2008-06-21 12:29:17 PDT
(In reply to
comment #2
)
> Some reflections are rendered wrong (Reflections are missing if a image is > transformed and the reflection is translated).
It could be a problem of path and clip in GraphicsContext.
Dirk Schulze
Comment 6
2008-06-21 13:41:45 PDT
Do
http://developer.mozilla.org/samples/canvas-tutorial/5_4_canvas_scale.html
and the wrong reflection of images with borders base on the same problem? Both are drawn with canvas and on both, parts of the drawing, is filled with the stroke-color of a line/border.
Dirk Schulze
Comment 7
2008-06-28 08:13:44 PDT
The main problem is solved. The problem with the borders is a problem with canvas. strokeStyle and fillStyle are saved to the same source pattern. I would mark this bug as a duplication of
https://bugs.webkit.org/show_bug.cgi?id=19789
now.
Dirk Schulze
Comment 8
2008-08-18 06:38:20 PDT
Wrong border problem is fixed with
https://bugs.webkit.org/show_bug.cgi?id=20405
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug