[Webkit-unassigned] [Bug 16979] Patch to conditionalize some CG/Cairo support in win32

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 31 13:09:05 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=16979





------- Comment #35 from bfulgham at gmail.com  2008-01-31 13:09 PDT -------
(In reply to comment #34)
>  void BitmapImage::drawFrameMatchingSourceSize(GraphicsContext* ctxt, const
> FloatRect& dstRect, const IntSize& srcSize, CompositeOperator compositeOp)
>  {
>      int frames = frameCount();
> +    size_t imageHeight = 0;
> +    size_t imageWidth = 0;
>      for (int i = 0; i < frames; ++i) {
> -        CGImageRef image = frameAtIndex(i);
> -        if (CGImageGetHeight(image) == (size_t)srcSize.height() &&
> CGImageGetWidth(image) == (size_t)srcSize.width()) {
> +        NativeImagePtr image = frameAtIndex(i);
> +        imageHeight = CGImageGetHeight(image);
> +        imageWidth = CGImageGetWidth(image);
> +        if (imageHeight == static_cast<size_t>(srcSize.height()) && imageWidth
> == static_cast<size_t>(srcSize.width())) {
> 
> I still don't think imageHeight and imageWidth should be moved out of the loop
> like this, and we should be using CGImageRef instead of NativeImagePtr. Similar
> comments apply to ImageCairoWin.cpp.

Oh -- I forgot about this change.  I had done this when I was trying to fit
Ciaro and CG code in the same file, so by lifting the height/width calculation
out, I could #if/def around just those two lines and handle both cases.

It's not needed now, and I have now returned it to the original form. 


-- 
Configure bugmail: http://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