Changeset 57687 in webkit


Ignore:
Timestamp:
Apr 15, 2010 4:58:42 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-15 Nicolas Weber <thakis@chromium.org>

Reviewed by Dimitri Glazkov.

Fix drag image thumbnails for indexed images.
https://bugs.webkit.org/show_bug.cgi?id=37621

  • platform/chromium/DragImageChromiumMac.cpp: (WebCore::scaleDragImage): Always use RGB color space. (WebCore::dissolveDragImageToFraction): Always use RGB color space.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r57680 r57687  
     12010-04-15  Nicolas Weber  <thakis@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Fix drag image thumbnails for indexed images.
     6        https://bugs.webkit.org/show_bug.cgi?id=37621
     7
     8        * platform/chromium/DragImageChromiumMac.cpp:
     9        (WebCore::scaleDragImage): Always use RGB color space.
     10        (WebCore::dissolveDragImageToFraction): Always use RGB color space.
     11
    1122010-04-15  Adam Roben  <aroben@apple.com>
    213
  • trunk/WebCore/platform/chromium/DragImageChromiumMac.cpp

    r57180 r57687  
    3434#include "Image.h"
    3535#include "NotImplemented.h"
     36#include <wtf/RetainPtr.h>
    3637
    3738#include <CoreGraphics/CGBitmapContext.h>
     
    5859    size_t width = roundf(CGImageGetWidth(image) * scale.width());
    5960    size_t height = roundf(CGImageGetHeight(image) * scale.height());
    60     CGContextRef context = CGBitmapContextCreate(0, width, height, 8, width * 4, CGImageGetColorSpace(image), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
     61
     62    RetainPtr<CGColorSpaceRef> deviceRGB(WTF::AdoptCF, CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
     63    CGContextRef context = CGBitmapContextCreate(0, width, height, 8, width * 4, deviceRGB.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
     64
    6165    if (!context)
    6266        return 0;
     
    7579    size_t width = CGImageGetWidth(image);
    7680    size_t height = CGImageGetHeight(image);
    77     CGContextRef context = CGBitmapContextCreate(0, width, height, 8, width * 4, CGImageGetColorSpace(image), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
     81
     82    RetainPtr<CGColorSpaceRef> deviceRGB(WTF::AdoptCF, CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB));
     83    CGContextRef context = CGBitmapContextCreate(0, width, height, 8, width * 4, deviceRGB.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
     84
    7885    if (!context)
    7986        return 0;
Note: See TracChangeset for help on using the changeset viewer.