Changeset 71071 in webkit


Ignore:
Timestamp:
Nov 1, 2010 4:25:50 PM (13 years ago)
Author:
dimich@chromium.org
Message:

2010-11-01 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r71065.
http://trac.webkit.org/changeset/71065
https://bugs.webkit.org/show_bug.cgi?id=48801

Seem to breake a lot of tests on Chromium bots (Requested by
dimich on #webkit).

  • platform/image-decoders/ImageDecoder.cpp:
  • platform/image-decoders/ImageDecoder.h:
  • platform/image-decoders/cg/ImageDecoderCG.cpp: (WebCore::RGBA32Buffer::asNewNativeImage):
  • platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable):
  • platform/image-decoders/qt/RGBA32BufferQt.cpp:
  • platform/image-decoders/skia/ImageDecoderSkia.cpp:
Location:
trunk/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r71066 r71071  
     12010-11-01  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r71065.
     4        http://trac.webkit.org/changeset/71065
     5        https://bugs.webkit.org/show_bug.cgi?id=48801
     6
     7        Seem to breake a lot of tests on Chromium bots (Requested by
     8        dimich on #webkit).
     9
     10        * platform/image-decoders/ImageDecoder.cpp:
     11        * platform/image-decoders/ImageDecoder.h:
     12        * platform/image-decoders/cg/ImageDecoderCG.cpp:
     13        (WebCore::RGBA32Buffer::asNewNativeImage):
     14        * platform/image-decoders/png/PNGImageDecoder.cpp:
     15        (WebCore::PNGImageDecoder::headerAvailable):
     16        (WebCore::PNGImageDecoder::rowAvailable):
     17        * platform/image-decoders/qt/RGBA32BufferQt.cpp:
     18        * platform/image-decoders/skia/ImageDecoderSkia.cpp:
     19
    1202010-11-01  Matthew Delaney  <mdelaney@apple.com>
    221
  • trunk/WebCore/platform/image-decoders/ImageDecoder.cpp

    r71065 r71071  
    188188{
    189189    m_hasAlpha = alpha;
    190 }
    191 
    192 void RGBA32Buffer::setColorProfile(const ColorProfile& colorProfile)
    193 {
    194     m_colorProfile = colorProfile;
    195190}
    196191
  • trunk/WebCore/platform/image-decoders/ImageDecoder.h

    r71065 r71071  
    4747namespace WebCore {
    4848
    49     // FIXME: Do we want better encapsulation?
    50     typedef Vector<char> ColorProfile;
    51 
    5249    // The RGBA32Buffer object represents the decoded image data in RGBA32
    5350    // format.  This buffer is what all decoders write a single frame into.
     
    129126
    130127        void setHasAlpha(bool alpha);
    131         void setColorProfile(const ColorProfile&);
    132128        void setRect(const IntRect& r) { m_rect = r; }
    133129        void setStatus(FrameStatus status);
     
    197193        bool m_hasAlpha; // Whether or not any of the pixels in the buffer
    198194                         // have transparency.
    199         ColorProfile m_colorProfile;
    200195#endif
    201196        IntRect m_rect; // The rect of the original specified frame within
     
    350345        RefPtr<SharedBuffer> m_data; // The encoded data.
    351346        Vector<RGBA32Buffer> m_frameBufferCache;
    352         ColorProfile m_colorProfile;
    353347        bool m_scaled;
    354348        Vector<int> m_scaledColumns;
  • trunk/WebCore/platform/image-decoders/cg/ImageDecoderCG.cpp

    r71065 r71071  
    6565}
    6666
    67 static CGColorSpaceRef createColorSpace(const ColorProfile& colorProfile)
    68 {
    69     if (colorProfile.isEmpty())
    70         return CGColorSpaceCreateDeviceRGB();
    71 
    72     RetainPtr<CFDataRef> data(AdoptCF, CFDataCreate(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(colorProfile.data()), colorProfile.size()));
    73 #if !defined(TARGETING_TIGER) && !defined(TARGETING_LEOPARD)
    74     return CGColorSpaceCreateWithICCProfile(data.get());
    75 #else
    76     RetainPtr<CGColorSpaceRef> deviceColorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
    77     RetainPtr<CGDataProviderRef> profileDataProvider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
    78     CGFloat ranges[] = {0.0, 255.0, 0.0, 255.0, 0.0, 255.0};
    79     return CGColorSpaceCreateICCBased(3, ranges, profileDataProvider.get(), deviceColorSpace.get());
    80 #endif
    81 }
    82 
    8367NativeImagePtr RGBA32Buffer::asNewNativeImage() const
    8468{
    85     RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, createColorSpace(m_colorProfile));
     69    // FIXME: Figure out the right color space.
     70    DEFINE_STATIC_LOCAL(RetainPtr<CGColorSpaceRef>, deviceColorSpace, (AdoptCF, CGColorSpaceCreateDeviceRGB()));
    8671    RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(m_backingStore.get()));
    8772
    8873    CGImageAlphaInfo alphaInfo = m_premultiplyAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaFirst;
    8974
    90     return CGImageCreate(width(), height(), 8, 32, width() * sizeof(PixelData), colorSpace.get(),
     75    return CGImageCreate(width(), height(), 8, 32, width() * sizeof(PixelData), deviceColorSpace.get(),
    9176        alphaInfo | kCGBitmapByteOrder32Host, dataProvider.get(), 0, false, kCGRenderingIntentDefault);
    9277}
  • trunk/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp

    r71065 r71071  
    221221}
    222222
    223 static ColorProfile readColorProfile(png_structp png, png_infop info)
    224 {
    225 #ifdef PNG_iCCP_SUPPORTED
    226     char* profileName;
    227     int compressionType;
    228     char* profile;
    229     png_uint_32 profileLength;
    230     png_get_iCCP(png, info, &profileName, &compressionType, &profile, &profileLength);
    231     if (profile) {
    232         ColorProfile colorProfile;
    233         colorProfile.append(profile, profileLength);
    234         return colorProfile;
    235     }
    236 #endif
    237     return ColorProfile();
    238 }
    239 
    240223void PNGImageDecoder::headerAvailable()
    241224{
     
    267250    png_get_IHDR(png, info, &width, &height, &bitDepth, &colorType, &interlaceType, &compressionType, &filterType);
    268251
    269     m_colorProfile = readColorProfile(png, info);
    270 
    271252    // The options we set here match what Mozilla does.
    272253
     
    331312        buffer.setStatus(RGBA32Buffer::FramePartial);
    332313        buffer.setHasAlpha(false);
    333         buffer.setColorProfile(m_colorProfile);
    334314
    335315        // For PNGs, the frame always fills the entire image.
  • trunk/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp

    r71065 r71071  
    2828#include "config.h"
    2929#include "ImageDecoder.h"
    30 
    31 #include "NotImplemented.h"
    3230
    3331#include <QPixmap>
     
    127125}
    128126
    129 void RGBA32Buffer::setColorProfile(const ColorProfile& colorProfile)
    130 {
    131     notImplemented();
    132 }
    133 
    134127void RGBA32Buffer::setStatus(FrameStatus status)
    135128{
  • trunk/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp

    r71065 r71071  
    2727#include "config.h"
    2828#include "ImageDecoder.h"
    29 
    30 #include "NotImplemented.h"
    3129
    3230namespace WebCore {
     
    112110}
    113111
    114 void RGBA32Buffer::setColorProfile(const ColorProfile& colorProfile)
    115 {
    116     notImplemented();
    117 }
    118 
    119112void RGBA32Buffer::setStatus(FrameStatus status)
    120113{
Note: See TracChangeset for help on using the changeset viewer.