Changeset 70394 in webkit
- Timestamp:
- Oct 23, 2010 10:05:21 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r70390 r70394 1 2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Unreviewed, rolling out r70369. 4 http://trac.webkit.org/changeset/70369 5 https://bugs.webkit.org/show_bug.cgi?id=47974 6 7 Caused weird artifacts in expected results. 8 9 * wtf/Platform.h: 10 1 11 2010-10-23 Martin Robinson <mrobinson@igalia.com> 2 12 -
trunk/JavaScriptCore/wtf/Platform.h
r70369 r70394 532 532 #endif 533 533 534 #if PLATFORM(CHROMIUM)535 #define WTF_USE_WEBKIT_IMAGE_DECODERS 1536 #endif537 538 534 #if PLATFORM(BREWMP) 539 535 #define WTF_PLATFORM_SKIA 1 -
trunk/WebCore/ChangeLog
r70392 r70394 1 2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Unreviewed, rolling out r70369. 4 http://trac.webkit.org/changeset/70369 5 https://bugs.webkit.org/show_bug.cgi?id=47974 6 7 Caused weird artifacts in expected results. 8 9 * WebCore.gyp/WebCore.gyp: 10 * WebCore.gypi: 11 * loader/CachedImage.cpp: 12 (WebCore::CachedImage::createImage): 13 * platform/graphics/ImageSource.h: 14 * platform/image-decoders/ImageDecoder.cpp: 15 (WebCore::RGBA32Buffer::operator=): 16 (WebCore::RGBA32Buffer::clear): 17 (WebCore::RGBA32Buffer::zeroFill): 18 (WebCore::RGBA32Buffer::copyBitmapData): 19 (WebCore::RGBA32Buffer::setSize): 20 * platform/image-decoders/ImageDecoder.h: 21 (WebCore::RGBA32Buffer::getAddr): 22 * platform/image-decoders/cairo/ImageDecoderCairo.cpp: 23 (WebCore::RGBA32Buffer::asNewNativeImage): 24 * platform/image-decoders/cg/ImageDecoderCG.cpp: Removed. 25 * platform/image-decoders/haiku/ImageDecoderHaiku.cpp: 26 (WebCore::RGBA32Buffer::asNewNativeImage): 27 * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp: 28 (WebCore::RGBA32Buffer::asNewNativeImage): 29 * platform/image-decoders/wx/ImageDecoderWx.cpp: 30 (WebCore::RGBA32Buffer::asNewNativeImage): 31 1 32 2010-10-23 Adam Barth <abarth@webkit.org> 2 33 -
trunk/WebCore/WebCore.gyp/WebCore.gyp
r70369 r70394 1165 1165 ['exclude', 'platform/graphics/chromium/ImageChromium\\.cpp$'], 1166 1166 1167 # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg 1168 # even though it is included by regex above. 1169 ['exclude', 'platform/graphics/cg/ImageSourceCG\\.cpp$'], 1170 ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'], 1171 1172 # ImageDecoderSkia is not used on mac. ImageDecoderCG is used instead. 1167 # The Mac uses ImageSourceCG.cpp from platform/graphics/cg, included 1168 # by regex above, instead. 1169 ['exclude', 'platform/graphics/ImageSource\\.cpp$'], 1170 1171 # Skia image-decoders are also not used on mac. CoreGraphics 1172 # is used directly instead. 1173 ['exclude', 'platform/image-decoders/ImageDecoder\\.h$'], 1174 ['exclude', 'platform/image-decoders/bmp/BMPImageDecoder\\.(cpp|h)$'], 1175 ['exclude', 'platform/image-decoders/bmp/BMPImageReader\\.(cpp|h)$'], 1176 ['exclude', 'platform/image-decoders/gif/GIFImageDecoder\\.(cpp|h)$'], 1177 ['exclude', 'platform/image-decoders/gif/GIFImageReader\\.(cpp|h)$'], 1178 ['exclude', 'platform/image-decoders/ico/ICOImageDecoder\\.(cpp|h)$'], 1179 ['exclude', 'platform/image-decoders/jpeg/JPEGImageDecoder\\.(cpp|h)$'], 1180 ['exclude', 'platform/image-decoders/webp/WEBPImageDecoder\\.(cpp|h)$'], 1181 ['exclude', 'platform/image-decoders/png/PNGImageDecoder\\.(cpp|h)$'], 1173 1182 ['exclude', 'platform/image-decoders/skia/ImageDecoderSkia\\.cpp$'], 1174 [' include', 'platform/image-decoders/cg/ImageDecoderCG\\.cpp$'],1183 ['exclude', 'platform/image-decoders/xbm/XBMImageDecoder\\.(cpp|h)$'], 1175 1184 1176 1185 # Again, Skia is not used on Mac. -
trunk/WebCore/WebCore.gypi
r70369 r70394 2846 2846 'platform/image-decoders/bmp/BMPImageReader.h', 2847 2847 'platform/image-decoders/cairo/ImageDecoderCairo.cpp', 2848 'platform/image-decoders/cg/ImageDecoderCG.cpp',2849 2848 'platform/image-decoders/gif/GIFImageDecoder.cpp', 2850 2849 'platform/image-decoders/gif/GIFImageDecoder.h', -
trunk/WebCore/loader/CachedImage.cpp
r70369 r70394 238 238 if (m_image) 239 239 return; 240 #if PLATFORM(CG) && !USE(WEBKIT_IMAGE_DECODERS)240 #if PLATFORM(CG) 241 241 if (m_response.mimeType() == "application/pdf") { 242 242 m_image = PDFDocumentImage::create(); -
trunk/WebCore/platform/graphics/ImageSource.h
r70369 r70394 64 64 65 65 #if PLATFORM(CG) 66 #if USE(WEBKIT_IMAGE_DECODERS)67 class ImageDecoder;68 typedef ImageDecoder* NativeImageSourcePtr;69 #else70 66 typedef CGImageSourceRef NativeImageSourcePtr; 71 #endif72 67 typedef CGImageRef NativeImagePtr; 73 68 #elif PLATFORM(OPENVG) -
trunk/WebCore/platform/image-decoders/ImageDecoder.cpp
r70369 r70394 118 118 return *this; 119 119 120 copy ReferenceToBitmapData(other);120 copyBitmapData(other); 121 121 setRect(other.rect()); 122 122 setStatus(other.status()); … … 129 129 void RGBA32Buffer::clear() 130 130 { 131 m_backingStore.clear(); 132 m_bytes = 0; 131 m_bytes.clear(); 133 132 m_status = FrameEmpty; 134 133 // NOTE: Do not reset other members here; clearFrameBufferCache() calls this … … 140 139 void RGBA32Buffer::zeroFill() 141 140 { 142 m emset(m_bytes, 0, m_size.width() * m_size.height() * sizeof(PixelData));141 m_bytes.fill(0); 143 142 m_hasAlpha = true; 144 }145 146 #if !PLATFORM(CF)147 148 void RGBA32Buffer::copyReferenceToBitmapData(const RGBA32Buffer& other)149 {150 ASSERT(this != &other);151 copyBitmapData(other);152 143 } 153 144 … … 157 148 return true; 158 149 159 m_backingStore = other.m_backingStore; 160 m_bytes = m_backingStore.data(); 150 m_bytes = other.m_bytes; 161 151 m_size = other.m_size; 162 152 setHasAlpha(other.m_hasAlpha); … … 168 158 // NOTE: This has no way to check for allocation failure if the requested 169 159 // size was too big... 170 m_backingStore.resize(newWidth * newHeight); 171 m_bytes = m_backingStore.data(); 160 m_bytes.resize(newWidth * newHeight); 172 161 m_size = IntSize(newWidth, newHeight); 173 162 … … 177 166 return true; 178 167 } 179 180 #endif181 168 182 169 bool RGBA32Buffer::hasAlpha() const -
trunk/WebCore/platform/image-decoders/ImageDecoder.h
r70369 r70394 86 86 // Creates a new copy of the image data in |other|, so the two images 87 87 // can be modified independently. Returns whether the copy succeeded. 88 bool copyBitmapData(const RGBA32Buffer&); 89 90 // Creates a new reference to the image data in |other|. The two images 91 // share a common backing store. 92 void copyReferenceToBitmapData(const RGBA32Buffer&); 88 bool copyBitmapData(const RGBA32Buffer& other); 93 89 94 90 // Copies the pixel data at [(startX, startY), (endX, startY)) to the … … 142 138 143 139 private: 144 #if PLATFORM(CF)145 typedef RetainPtr<CFMutableDataRef> NativeBackingStore;146 #else147 typedef Vector<PixelData> NativeBackingStore;148 #endif149 150 140 int width() const; 151 141 int height() const; … … 160 150 return reinterpret_cast_ptr<QRgb*>(m_image.scanLine(y)) + x; 161 151 #else 162 return m_bytes + (y * width()) + x;152 return m_bytes.data() + (y * width()) + x; 163 153 #endif 164 154 } … … 187 177 IntSize m_size; 188 178 #else 189 NativeBackingStore m_backingStore; 190 PixelData* m_bytes; // The memory is backed by m_backingStore. 191 IntSize m_size; // The size of the buffer. This should be the 192 // same as ImageDecoder::m_size. 193 bool m_hasAlpha; // Whether or not any of the pixels in the buffer 194 // have transparency. 195 #endif 196 IntRect m_rect; // The rect of the original specified frame within 197 // the overall buffer. This will always just be 198 // the entire buffer except for GIF frames whose 199 // original rect was smaller than the overall 200 // image size. 179 Vector<PixelData> m_bytes; 180 IntSize m_size; // The size of the buffer. This should be the 181 // same as ImageDecoder::m_size. 182 bool m_hasAlpha; // Whether or not any of the pixels in the buffer 183 // have transparency. 184 #endif 185 IntRect m_rect; // The rect of the original specified frame within 186 // the overall buffer. This will always just be 187 // the entire buffer except for GIF frames whose 188 // original rect was smaller than the overall 189 // image size. 201 190 FrameStatus m_status; // Whether or not this frame is completely 202 191 // finished decoding. 203 unsigned m_duration; // The animation delay. 204 FrameDisposalMethod m_disposalMethod; // What to do with this frame's data when 205 // initializing the next frame. 206 bool m_premultiplyAlpha; // Whether to premultiply alpha into R, G, B 207 // channels; by default it's true. 192 unsigned m_duration; // The animation delay. 193 FrameDisposalMethod m_disposalMethod; 194 // What to do with this frame's data when 195 // initializing the next frame. 196 bool m_premultiplyAlpha; 197 // Whether to premultiply alpha into R, G, B 198 // channels; by default it's true. 208 199 }; 209 200 -
trunk/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp
r70369 r70394 35 35 return cairo_image_surface_create_for_data( 36 36 reinterpret_cast<unsigned char*>(const_cast<PixelData*>( 37 m_bytes )), CAIRO_FORMAT_ARGB32, width(), height(),37 m_bytes.data())), CAIRO_FORMAT_ARGB32, width(), height(), 38 38 width() * sizeof(PixelData)); 39 39 } -
trunk/WebCore/platform/image-decoders/haiku/ImageDecoderHaiku.cpp
r70369 r70394 37 37 OwnPtr<BBitmap> bitmap(new BBitmap(BRect(0, 0, width() - 1, height() - 1), 0, B_RGBA32, bytesPerRow)); 38 38 39 const uint8* source = reinterpret_cast<const uint8*>(m_bytes );39 const uint8* source = reinterpret_cast<const uint8*>(m_bytes.data()); 40 40 uint8* destination = reinterpret_cast<uint8*>(bitmap->Bits()); 41 41 int h = height(); -
trunk/WebCore/platform/image-decoders/openvg/ImageDecoderOpenVG.cpp
r70369 r70394 60 60 ASSERT_VG_NO_ERROR(); 61 61 62 PixelData* pixelData = const_cast<PixelData*>(m_bytes );62 PixelData* pixelData = const_cast<PixelData*>(m_bytes.data()); 63 63 pixelData += (tileRect.y() * width()) + tileRect.x(); 64 64 -
trunk/WebCore/platform/image-decoders/wx/ImageDecoderWx.cpp
r70369 r70394 49 49 // This code works properly on both ppc and intel, meaning the issue is 50 50 // likely not an issue of byte order getting mixed up on different archs. 51 const unsigned char* bytes = (const unsigned char*)m_bytes ;51 const unsigned char* bytes = (const unsigned char*)m_bytes.data(); 52 52 int rowCounter = 0; 53 53 long pixelCounter = 0; 54 54 WxPixelData::Iterator p(data); 55 55 WxPixelData::Iterator rowStart = p; 56 for (size_t i = 0; i < m_ size.width() * m_size.height() * sizeof(PixelData); i += sizeof(PixelData)) {56 for (size_t i = 0; i < m_bytes.size() * sizeof(PixelData); i += sizeof(PixelData)) { 57 57 p.Red() = bytes[i + 2]; 58 58 p.Green() = bytes[i + 1];
Note: See TracChangeset
for help on using the changeset viewer.