[Webkit-unassigned] [Bug 111302] Fix the visibility issue of MediaPlayer when painting pixel data from HTMLVideoElement to Canvas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 26 02:51:41 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=111302





--- Comment #4 from Jun Jiang <jun.a.jiang at intel.com>  2013-03-26 02:54:07 PST ---
Hi, Eric. Thanks for your comments. 
MediaPlayer::setVisible() was first introduced to work with MediaPlayer::paint() to display video in Web Page and acted as a role as mentioned above. It was easy to understand this function and its name. It began a little strange only when the first implementation for MediaPlayer::paintCurrentFrameInContext() was introduced and appeared in the canvas path..
Moreover, as we can see, some platform ports have no implementation for MediaPlayerPrivate::setVisible(bool) and only use MediaPlayer::visible() in MediaPlayer::paint() to check if a previous MediaPlayer::setVisible(true) was called and would return early without true paint otherwise, such as MediaPlayerPrivateGstreamer port. It just follows the interface guidelines to setVisible(true) first, and then a paint(). Therefore, setVisible() interface has two combined meaning now: 1). setup or tear down necessary helper objects. 2). mark up the status of the paint.
Looking further, if MediaPlayer and MediaPlayer::setVisible() are not mean to be exposed to Application via JS bindings in the future, I think current implementation may be already enough compared with adding new APIs to make things much more clear.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list