WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 36034
[Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have effect with AC
https://bugs.webkit.org/show_bug.cgi?id=36034
Summary
[Qt] GraphicsLayer: Opacity change from zero to non-zero doesn't always have ...
Kim Grönholm
Reported
2010-03-11 14:33:57 PST
Created
attachment 50541
[details]
Opacity transition from 0 to 1 in 5s When a web page has only an element which opacity is zero and the opacity is changed to non-zero, the element doesn't become visible. If the mouse cursor is moved outside the window area and back in, the element redraws with correct opacity. After the element has been drawn once with non-zero opacity, the subsequent opacity changes affect immediately. The bug doesn't occur without AC. Attached a test case to demonstrate the issue.
Attachments
Opacity transition from 0 to 1 in 5s
(533 bytes, text/html)
2010-03-11 14:33 PST
,
Kim Grönholm
no flags
Details
patch for the bug #36034
(1.56 KB, patch)
2010-03-11 14:44 PST
,
Kim Grönholm
no flags
Details
Formatted Diff
Diff
ifdef the QTBUG-7714 workaround for qt versions lower than 4.6.2
(1.68 KB, patch)
2010-03-22 07:32 PDT
,
Kim Grönholm
kenneth
: review+
kenneth
: commit-queue+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kim Grönholm
Comment 1
2010-03-11 14:44:06 PST
Created
attachment 50544
[details]
patch for the
bug #36034
The issue seems to be a bug in QGraphicsScene/QGraphicsItem. Attached a patch which introduces a workaround for it.
Kenneth Rohde Christiansen
Comment 2
2010-03-13 10:10:42 PST
Comment on
attachment 50544
[details]
patch for the
bug #36034
Seems sensible. Have you reported the bug to Qt DF?
WebKit Commit Bot
Comment 3
2010-03-13 11:28:51 PST
Comment on
attachment 50544
[details]
patch for the
bug #36034
Clearing flags on attachment: 50544 Committed
r55967
: <
http://trac.webkit.org/changeset/55967
>
WebKit Commit Bot
Comment 4
2010-03-13 11:28:55 PST
All reviewed patches have been landed. Closing bug.
Simon Hausmann
Comment 5
2010-03-13 15:49:24 PST
Comment on
attachment 50544
[details]
patch for the
bug #36034
> - m_layer.data()->setOpacity(qMin<qreal>(qMax<qreal>(fromValue + (toValue-fromValue)*progress, 0), 1)); > + qreal opacity = qBound(qreal(0), fromValue + (toValue-fromValue)*progress, qreal(1)); > + > + // FIXME: this is a hack, due to a probable QGraphicsScene bug. > + // Without this the opacity change doesn't always have immediate effect. > + if (!m_layer.data()->opacity() && opacity) > + m_layer.data()->scene()->update(); > + > + m_layer.data()->setOpacity(opacity);
It would be good to get a sign-off from Noam on this one and also add a comment here with a link to the bugreport at
http://bugreports.qt.nokia.com/
. Updating the entire scene is obviously a very expensive operation, so it would be good to know when we can remove this workaround in the future.
Noam Rosenthal
Comment 6
2010-03-13 17:43:47 PST
I did a smoke test to this - signed off!
Noam Rosenthal
Comment 7
2010-03-13 17:47:23 PST
I intend to collect Qt bugs that we needed to work-around to try to look at them deeply with Qt R&D.
Simon Hausmann
Comment 8
2010-03-14 00:56:35 PST
(In reply to
comment #7
)
> I intend to collect Qt bugs that we needed to work-around to try to look at > them deeply with Qt R&D.
Excellent, thanks!
Noam Rosenthal
Comment 9
2010-03-16 09:05:00 PDT
Apparently
http://bugreports.qt.nokia.com/browse/QTBUG-7714
was already reported and being worked on.
Simon Hausmann
Comment 10
2010-03-19 09:01:48 PDT
(In reply to
comment #9
)
> Apparently
http://bugreports.qt.nokia.com/browse/QTBUG-7714
was already > reported and being worked on.
Excellent, looks like the fix is in Qt 4.6.2, which is released. I think we should place an #ifdef around the update at least, to take the faster code path without the expensive update for Qt versions >= 4.6.2.
Kim Grönholm
Comment 11
2010-03-22 07:32:50 PDT
Created
attachment 51282
[details]
ifdef the QTBUG-7714 workaround for qt versions lower than 4.6.2 Added the Qt version check as Simon suggested.
Simon Hausmann
Comment 12
2010-03-22 08:47:09 PDT
Thanks Kim and Kenneth :)
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