Bug 20079
| Summary: | [Qt] Canvas transparency errors | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | marcoil <marc.ordinasillopis> |
| Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| URL: | http://annevankesteren.nl/test/html/canvas/demo/002.html | ||
marcoil
In the url, the circles should be translucent and they are completely opaque. I'm also getting some background artifacts, like if the background wasn't properly initialized.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dirk Schulze
This problem appears after the canvas clean-up.
In HTMLCanvasElement.cpp a QImage was initialised and filled with fill(0). To make everything a bit more platform-independent, the qt code was droped and replaced by an image-buffer.
And ImageBuffer creates a QPixmap. This pixmap isn't filled or cleared. Thats why you see this strange "background". This happens on every canvas-example where the background isn't set by canvas.fillRect() or something simular.
I tried to fix it by adding px.fill(Qt::transparent); to ImageBuffer::create(). That works for canvas (except of compositing), but brakes many html-pages.
Dirk Schulze
talked to Simon Hausmann over IRC and it could be the problem that QPainter is not calling end().
QtWebKit seems to work with it like before the changes on Canvas then.
Dirk Schulze
no longer an issue.