[Webkit-unassigned] [Bug 108899] Coordinated Graphics : Refactor GraphicsSurface and ShareableBitmap to be responsible for their GraphicsContext

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 26 00:40:08 PST 2013


--- Comment #22 from Jae Hyun Park <jae.park at company100.net>  2013-02-26 00:42:31 PST ---
(In reply to comment #21)
> How about (with fake function names)
> class ShareableBitmapClient  {
>   virtual drawBuffer(ShareableBitmap*, GraphicsContext*) = 0;
> }
> ShareableBitmap::drawContents()
> {
>   OwnPtr<GraphicsContext> context = create.....
>   client->drawBuffer(this, context);
> }
> And there would be no other way to get the GraphicsContext for a bitmap.
> That way there is zero ambiguity about the GraphicsContext ownership.

Thanks for the comment!

However, I am not sure how this pattern solves the current problem.
I don't see a difference from just passing OwnPtr<GraphicsContext>.

The core of this refactoring is to prepare for implementing ThreadSafeCoordinatedSurface, which has ImageBuffer/GraphicsSurface as a backend.

Are you against the first approach I mentioned?
1. Add an API in ImageBuffer that creates a new GraphicsContext and returns as PassOwnPtr<GraphicsContext> (like current behavior in GraphicsSurface).
-> This is the most proper approach that I can think of right now, even though it may not be the best approach.

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