[Webkit-unassigned] [Bug 35783] [GStreamer] Use ImageBuffer API to do painting

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 8 13:44:50 PST 2010


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


Gustavo Noronha (kov) <gns at gnome.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50222|review?                     |review-, commit-queue-
               Flag|                            |




--- Comment #7 from Gustavo Noronha (kov) <gns at gnome.org>  2010-03-08 13:44:50 PST ---
(From update of attachment 50222)
 49     private:
 50         cairo_surface_t* m_surface;
 51         RefPtr<BitmapImage> m_image;
 52 
 53     };

Drop the needless line.

 1172     bool success;
 1173     ImageGStreamer gstImage(m_buffer, &success);

I don't like this. It looks very non-idiomatic. I would prefer to have the
createClass pattern used in, say, ScrollBar. That means create a static
function that instantiates the object, and does whatever
checking/initialization is needed, then return the object or NULL. You can
decide on success based on the return value being NULL or not. Also, you seem
to be leaking the image, aren't you? Should it be OwnPtr?

 1180     bool useLowQualityScale = false;
 1181     context->drawImage(reinterpret_cast<Image*>(gstImage.image().get()),
styleColorSpace,
 1182                        rect, op, useLowQualityScale);

This is not very readable. You're saying 'Do not use low quality scale' by
passing a 'useLowQualityScale' variable =D. I understand it's a boolean, of
course, but I got confused reading this. I'd drop the variables, give values
directly.

-- 
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