[Webkit-unassigned] [Bug 26425] Small Refactoring to Consolidate Common GDI Calls

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 16 14:43:57 PDT 2009


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





------- Comment #7 from aroben at apple.com  2009-06-16 14:43 PDT -------
(In reply to comment #6)
> (In reply to comment #5)
> > > + BITMAPINFO bitmapInfoForSize(const IntSize&, bool invertHeight = false);
> > Another option, which would allow moving this function out of GDIUtilities (and
> > get us a step closer to removing that file altogether), would be to create a
> > WebCore::BitmapInfo struct that derives from BITMAPINFO. Something like:
> > 
> > struct BitmapInfo : public BITMAPINFO {
> >     static BitmapInfo create(const IntSize&);
> >     static BitmapInfo createBottomUp(const IntSize&);
> > };
> 
> That's a good idea.  Should this be in its own set of files, or is there
> someplace  else where this would make sense?

I think having its own files would be best.

> > > + void fillWithClearColor(HBITMAP);
> > 
> > I'm not sure what to do with this one.
> 
> The only thing that uses this is GraphicsContextWinXXXX, so I can just make it
> a method of the class and put it there.

Adding a new function to GraphicsContext.h seems a little ugly for this
platform-specific function, especially since the function doesn't involve the
GraphicsContext at all.

It looks like the only caller to fillWithClearColor is getWindowsContext. Can
we do some refactoring to share that implementation, so that we don't need to
find a way to share just this one function?


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



More information about the webkit-unassigned mailing list