Changeset 57687 in webkit
- Timestamp:
- Apr 15, 2010 4:58:42 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57680 r57687 1 2010-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 1 12 2010-04-15 Adam Roben <aroben@apple.com> 2 13 -
trunk/WebCore/platform/chromium/DragImageChromiumMac.cpp
r57180 r57687 34 34 #include "Image.h" 35 35 #include "NotImplemented.h" 36 #include <wtf/RetainPtr.h> 36 37 37 38 #include <CoreGraphics/CGBitmapContext.h> … … 58 59 size_t width = roundf(CGImageGetWidth(image) * scale.width()); 59 60 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 61 65 if (!context) 62 66 return 0; … … 75 79 size_t width = CGImageGetWidth(image); 76 80 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 78 85 if (!context) 79 86 return 0;
Note: See TracChangeset
for help on using the changeset viewer.