There are several code paths where a WebKit IntSize is converted to a Microsoft SIZE struct, only to be changed back to an IntSize for further work. Instead, revise the API to take an IntSize argument so we don't have to do this wasted conversion. The only counter-case is in the IconDatabase, where we will have to convert a SIZE to an IntSize to accommodate this change. However, this "extra copy" code path is much less frequent than the other cases, which are used for cursor handling and the copy/paste buffer.
Created attachment 211353 [details] Patch
Comment on attachment 211353 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211353&action=review > Source/WebCore/platform/graphics/BitmapImage.h:153 > + virtual bool getHBITMAPOfSize(HBITMAP, const IntSize*); I think this should take a const IntSize. > Source/WebCore/platform/graphics/Image.h:164 > + virtual bool getHBITMAPOfSize(HBITMAP, const IntSize*) { return false; } Ditto. And use override.
Comment on attachment 211353 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211353&action=review >> Source/WebCore/platform/graphics/BitmapImage.h:153 >> + virtual bool getHBITMAPOfSize(HBITMAP, const IntSize*); > > I think this should take a const IntSize. I can't. The argument is optional, and the implementations take different code paths if an argument is supplied. >> Source/WebCore/platform/graphics/Image.h:164 >> + virtual bool getHBITMAPOfSize(HBITMAP, const IntSize*) { return false; } > > Ditto. And use override. Ditto for me, too. But I will change to use the OVERRIDE macro.
<rdar://problem/14969413>
Committed r155570: <http://trac.webkit.org/changeset/155570>