Summary: | [CAIRO] Image transformations are broken | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alp Toker <alp> | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | krit | ||||
Priority: | P2 | Keywords: | Cairo | ||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | http://www.netzgesta.de/reflex/ | ||||||
Attachments: |
|
Description
Alp Toker
2007-10-27 01:34:40 PDT
This seems fixed by now, probably should close this one... (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). 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. 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?
(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. 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. 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. Wrong border problem is fixed with https://bugs.webkit.org/show_bug.cgi?id=20405 |