1. 04 Oct, 2011 1 commit
  2. 25 Aug, 2011 1 commit
    • commit-queue@webkit.org's avatar
      [chromium] Leaking SkBitmaps for background images · 6f9b2c63
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66488
      
      Patch by John Bates <jbates@google.com> on 2011-08-25
      Reviewed by Stephen White.
      
      This patch simply changes NativeImageSkia to have a SkBitmap instead of
      deriving from SkBitmap. All dependent code updated to access the member
      instead of calling SkBitmap methods on NativeImageSkia objects. This
      may or may not fix the memory leak, but it's definitely a bug that could
      cause memory leaks.
      
      Source/WebCore:
      
      * platform/chromium/DragImageChromiumSkia.cpp:
      (WebCore::createDragImageFromImage):
      * platform/graphics/chromium/PlatformImage.cpp:
      (WebCore::PlatformImage::updateFromImage):
      * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
      (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha):
      (WebCore::BitmapImageSingleFrameSkia::size):
      (WebCore::BitmapImageSingleFrameSkia::notSolidColor):
      * platform/graphics/skia/GraphicsContext3DSkia.cpp:
      (WebCore::GraphicsContext3D::getImageData):
      * platform/graphics/skia/ImageSkia.cpp:
      (WebCore::paintSkBitmap):
      (WebCore::Image::drawPattern):
      (WebCore::BitmapImage::checkForSolidColor):
      * platform/graphics/skia/NativeImageSkia.cpp:
      (WebCore::NativeImageSkia::NativeImageSkia):
      (WebCore::NativeImageSkia::decodedSize):
      (WebCore::NativeImageSkia::resizedBitmap):
      * platform/graphics/skia/NativeImageSkia.h:
      (WebCore::NativeImageSkia::bitmap):
      * platform/graphics/skia/PatternSkia.cpp:
      (WebCore::Pattern::platformPattern):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageFrame::getAddr):
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::ImageFrame::operator=):
      (WebCore::ImageFrame::clearPixelData):
      (WebCore::ImageFrame::zeroFillPixelData):
      (WebCore::ImageFrame::copyBitmapData):
      (WebCore::ImageFrame::setSize):
      (WebCore::ImageFrame::hasAlpha):
      (WebCore::ImageFrame::setHasAlpha):
      (WebCore::ImageFrame::width):
      (WebCore::ImageFrame::height):
      
      Source/WebKit/chromium:
      
      * src/PlatformBridge.cpp:
      (WebCore::PlatformBridge::clipboardWriteImage):
      * src/WebImageDecoder.cpp:
      (WebKit::WebImageDecoder::getFrameAtIndex):
      * src/WebImageSkia.cpp:
      (WebKit::WebImage::fromData):
      (WebKit::WebImage::operator=):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f9b2c63
  3. 17 Apr, 2011 1 commit
    • paroga@webkit.org's avatar
      2011-04-17 Patrick Gansterer <paroga@webkit.org> · f226d9f3
      paroga@webkit.org authored
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * wtf/Platform.h:
      2011-04-17  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * config.h:
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::toDataURL):
              * html/HTMLCanvasElement.h:
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::setShadow):
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
              * html/canvas/CanvasRenderingContext2D.h:
              * html/canvas/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyStrokeColor):
              (WebCore::CanvasStyle::applyFillColor):
              * loader/cache/CachedFont.cpp:
              * loader/cache/CachedImage.cpp:
              (WebCore::CachedImage::createImage):
              * platform/FloatConversion.h:
              * platform/MIMETypeRegistry.cpp:
              (WebCore::initializeSupportedImageMIMETypes):
              (WebCore::initializeSupportedImageMIMETypesForEncoding):
              * platform/graphics/BitmapImage.h:
              * platform/graphics/Color.h:
              * platform/graphics/DashArray.h:
              * platform/graphics/FloatPoint.h:
              * platform/graphics/FloatRect.h:
              * platform/graphics/FloatSize.h:
              * platform/graphics/FontPlatformData.h:
              (WebCore::FontPlatformData::FontPlatformData):
              (WebCore::FontPlatformData::hash):
              * platform/graphics/GlyphBuffer.h:
              (WebCore::GlyphBuffer::advanceAt):
              (WebCore::GlyphBuffer::add):
              (WebCore::GlyphBuffer::expandLastAdvance):
              * platform/graphics/Gradient.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::setLegacyShadow):
              * platform/graphics/GraphicsContext.h:
              (WebCore::GraphicsContextState::GraphicsContextState):
              * platform/graphics/GraphicsContext3D.h:
              * platform/graphics/Image.cpp:
              * platform/graphics/Image.h:
              * platform/graphics/ImageBuffer.cpp:
              * platform/graphics/ImageBuffer.h:
              * platform/graphics/ImageBufferData.h:
              * platform/graphics/ImageSource.h:
              * platform/graphics/IntPoint.h:
              * platform/graphics/IntRect.h:
              * platform/graphics/IntSize.h:
              * platform/graphics/Path.h:
              * platform/graphics/Pattern.h:
              * platform/graphics/SimpleFontData.h:
              * platform/graphics/cg/ColorCG.cpp:
              * platform/graphics/cg/FloatPointCG.cpp:
              * platform/graphics/cg/FloatRectCG.cpp:
              * platform/graphics/cg/FloatSizeCG.cpp:
              * platform/graphics/cg/ImageCG.cpp:
              * platform/graphics/cg/ImageSourceCG.cpp:
              * platform/graphics/cg/IntPointCG.cpp:
              * platform/graphics/cg/IntRectCG.cpp:
              * platform/graphics/cg/IntSizeCG.cpp:
              * platform/graphics/cg/PDFDocumentImage.cpp:
              * platform/graphics/cg/PDFDocumentImage.h:
              * platform/graphics/cg/PathCG.cpp:
              * platform/graphics/cg/TransformationMatrixCG.cpp:
              * platform/graphics/chromium/ImageLayerChromium.h:
              * platform/graphics/chromium/LayerRendererChromium.cpp:
              * platform/graphics/chromium/LayerRendererChromium.h:
              * platform/graphics/chromium/PlatformCanvas.cpp:
              (WebCore::PlatformCanvas::resize):
              (WebCore::PlatformCanvas::AutoLocker::AutoLocker):
              (WebCore::PlatformCanvas::Painter::Painter):
              * platform/graphics/chromium/PlatformCanvas.h:
              * platform/graphics/chromium/PlatformImage.cpp:
              (WebCore::PlatformImage::updateFromImage):
              * platform/graphics/opentype/OpenTypeUtilities.cpp:
              * platform/graphics/transforms/AffineTransform.h:
              * platform/graphics/transforms/TransformationMatrix.h:
              * platform/graphics/win/DIBPixelData.h:
              * platform/graphics/win/FontCacheWin.cpp:
              (WebCore::FontCache::platformInit):
              (WebCore::createGDIFont):
              (WebCore::FontCache::createFontPlatformData):
              * platform/graphics/win/FontPlatformDataWin.cpp:
              (WebCore::FontPlatformData::FontPlatformData):
              * platform/graphics/win/GraphicsContextWin.cpp:
              * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
              * platform/graphics/win/SimpleFontDataWin.cpp:
              * platform/image-decoders/ImageDecoder.cpp:
              * platform/image-decoders/ImageDecoder.h:
              * rendering/RenderObject.h:
              * rendering/svg/RenderSVGResourceFilter.cpp:
              (WebCore::RenderSVGResourceFilter::postApplyResource):
              * rendering/svg/RenderSVGResourceGradient.cpp:
              (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
              (WebCore::RenderSVGResourceGradient::applyResource):
              * rendering/svg/RenderSVGResourceGradient.h:
              * rendering/svg/RenderSVGResourceMasker.cpp:
              (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
              * rendering/svg/RenderSVGResourcePattern.cpp:
              (WebCore::RenderSVGResourcePattern::applyResource):
      2011-04-17  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * src/GraphicsContext3DChromium.cpp:
              (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
              (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal):
              (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
              (WebCore::GraphicsContext3DInternal::reshape):
              * src/GraphicsContext3DInternal.h:
              * src/PlatformBridge.cpp:
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::doPixelReadbackToCanvas):
      2011-04-17  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * WebFrame.cpp:
              (WebFrame::spoolPages):
              * WebFrame.h:
              * WebPreferences.cpp:
              (WebPreferences::setFontSmoothing):
              (WebPreferences::setFontSmoothingContrast):
              * WebView.cpp:
              (systemParameterChanged):
      2011-04-17  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * Shared/ShareableBitmap.h:
              * Shared/WebCoreArgumentCoders.cpp:
              * Shared/WebCoreArgumentCoders.h:
              * Shared/WebGraphicsContext.cpp:
              (WebKit::WebGraphicsContext::WebGraphicsContext):
              * Shared/WebGraphicsContext.h:
              * Shared/win/PlatformCertificateInfo.cpp:
              (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
              * UIProcess/win/WebView.cpp:
              (WebKit::WebView::setFindIndicator):
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::drawRectToPDF):
              (WebKit::WebPage::drawPagesToPDF):
              * WebProcess/WebPage/win/WebPageWin.cpp:
              (WebKit::WebPage::platformPreferencesDidChange):
              * config.h:
      2011-04-17  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Adam Barth.
      
              Rename PLATFORM(CG) to USE(CG)
              https://bugs.webkit.org/show_bug.cgi?id=58729
      
              * DumpRenderTree/PixelDumpSupport.cpp:
              * DumpRenderTree/chromium/WebViewHost.cpp:
              (WebViewHost::paintRect):
              * DumpRenderTree/config.h:
              * DumpRenderTree/win/PixelDumpSupportWin.cpp:
              (createBitmapContextFromWebView):
              * TestWebKitAPI/PlatformWebView.h:
              * WebKitTestRunner/config.h:
              * WebKitTestRunner/win/TestInvocationWin.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f226d9f3
  4. 27 Mar, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-03-27 Ben Taylor <bentaylor.solx86@gmail.com> · 62573562
      commit-queue@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
              in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
      
              Compile fix only, no actual code change.
      
              * wtf/MessageQueue.h:
      2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
      
              Reviewed by Alexey Proskuryakov.
      
              https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
              in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
      
              Compile fix only, no actual code change.
      
              * dom/ExceptionCode.h:
              * editing/EditorInsertAction.h:
              * loader/FrameLoaderTypes.h:
              * platform/PlatformKeyboardEvent.h:
              * platform/ScrollTypes.h:
              * platform/graphics/BitmapImage.h:
              * platform/image-decoders/ImageDecoder.h:
              * platform/network/ProtectionSpace.h:
              * platform/network/ResourceHandleClient.h:
              * platform/network/ResourceRequestBase.h:
              * platform/text/TextCodec.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62573562
  5. 24 Feb, 2011 1 commit
    • paroga@webkit.org's avatar
      2011-02-24 Patrick Gansterer <paroga@webkit.org> · cb73e5d7
      paroga@webkit.org authored
              Reviewed by Eric Seidel.
      
              Rename PLATFORM(SKIA) to USE(SKIA)
              https://bugs.webkit.org/show_bug.cgi?id=55090
      
              * wtf/Platform.h:
      2011-02-24  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename PLATFORM(SKIA) to USE(SKIA)
              https://bugs.webkit.org/show_bug.cgi?id=55090
      
              * config.h: Removed second define of PLATFORM(SKIA).
              * html/HTMLCanvasElement.cpp:
              * platform/graphics/FloatPoint.h:
              * platform/graphics/FloatRect.h:
              * platform/graphics/Gradient.cpp:
              * platform/graphics/Gradient.h:
              * platform/graphics/GraphicsContext.cpp:
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/ImageSource.h:
              * platform/graphics/IntPoint.h:
              * platform/graphics/IntRect.h:
              * platform/graphics/Path.h:
              * platform/graphics/Pattern.cpp:
              * platform/graphics/Pattern.h:
              * platform/graphics/chromium/ContentLayerChromium.cpp:
              * platform/graphics/chromium/ContentLayerChromium.h:
              * platform/graphics/chromium/GLES2Canvas.cpp:
              * platform/graphics/chromium/ImageLayerChromium.cpp:
              * platform/graphics/chromium/LayerChromium.cpp:
              * platform/graphics/chromium/LayerRendererChromium.cpp:
              * platform/graphics/chromium/LayerRendererChromium.h:
              * platform/graphics/chromium/LayerTilerChromium.cpp:
              * platform/graphics/chromium/ShaderChromium.h:
              * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
              * platform/graphics/transforms/AffineTransform.h:
              * platform/graphics/transforms/TransformationMatrix.h:
              * platform/image-decoders/ImageDecoder.cpp:
              * platform/image-decoders/ImageDecoder.h:
              * rendering/svg/RenderSVGResourceSolidColor.cpp:
      2011-02-24  Patrick Gansterer  <paroga@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename PLATFORM(SKIA) to USE(SKIA)
              https://bugs.webkit.org/show_bug.cgi?id=55090
      
              * src/GraphicsContext3DChromium.cpp:
              (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
              (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
              * src/GraphicsContext3DInternal.h:
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::doPixelReadbackToCanvas):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb73e5d7
  6. 16 Feb, 2011 1 commit
  7. 08 Feb, 2011 1 commit
  8. 02 Feb, 2011 1 commit
    • commit-queue@webkit.org's avatar
      2011-02-02 Peter Kasting <pkasting@google.com> · e1fd4638
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              Clean up ImageDecoder's comments (remove/trim/clarify).
              https://bugs.webkit.org/show_bug.cgi?id=53455
      
              This also renames or eliminates a couple of functions for clarity, and
              switches a couple erroneous strncmp() calls to memcmp().
      
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageDecoder::create):
              (WebCore::ImageFrame::clearPixelData):
              (WebCore::ImageFrame::zeroFillPixelData):
              (WebCore::ImageFrame::setSize):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageFrame::originalFrameRect):
              (WebCore::ImageFrame::setOriginalFrameRect):
              (WebCore::ImageDecoder::ImageDecoder):
              (WebCore::ImageDecoder::~ImageDecoder):
              (WebCore::ImageDecoder::isSizeAvailable):
              (WebCore::ImageDecoder::size):
              (WebCore::ImageDecoder::setIgnoreGammaAndColorProfile):
              (WebCore::ImageDecoder::clearFrameBufferCache):
              (WebCore::ImageDecoder::isOverSize):
              * platform/image-decoders/bmp/BMPImageReader.cpp:
              (WebCore::BMPImageReader::processNonRLEData):
              * platform/image-decoders/cg/ImageDecoderCG.cpp:
              (WebCore::ImageFrame::setSize):
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::clearFrameBufferCache):
              (WebCore::GIFImageDecoder::frameComplete):
              (WebCore::GIFImageDecoder::initFrameBuffer):
              * platform/image-decoders/jpeg/JPEGImageDecoder.h:
              * platform/image-decoders/qt/ImageFrameQt.cpp:
              (WebCore::ImageFrame::operator=):
              (WebCore::ImageFrame::clearPixelData):
              (WebCore::ImageFrame::zeroFillPixelData):
              (WebCore::ImageFrame::setSize):
              * platform/image-decoders/skia/ImageDecoderSkia.cpp:
              (WebCore::ImageFrame::operator=):
              (WebCore::ImageFrame::clearPixelData):
              (WebCore::ImageFrame::zeroFillPixelData):
              (WebCore::ImageFrame::setSize):
              * platform/image-decoders/webp/WEBPImageDecoder.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1fd4638
  9. 20 Jan, 2011 1 commit
    • ossy@webkit.org's avatar
      Refactoring of the custom allocation framework · 95c1bc42
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=49897
      
      Patch by Zoltan Horvath <zoltan@webkit.org> on 2011-01-20
      Reviewed by Csaba Osztrogonác.
      
      Source/JavaScriptCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
      
      Source/WebCore:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Source/WebKit2:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      Tools:
      
      Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
      The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
      equivalent macro implementation at the necessary places.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95c1bc42
  10. 13 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      2011-01-13 Adam Barth <abarth@webkit.org> · ec499e3e
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Rename RGBA32Buffer to ImageFrame
              https://bugs.webkit.org/show_bug.cgi?id=52363
      
              Update references to the new name.
      
              * src/WebImageDecoder.cpp:
              (WebKit::WebImageDecoder::isFrameCompleteAtIndex):
              (WebKit::WebImageDecoder::getFrameAtIndex):
      2011-01-13  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Rename RGBA32Buffer to ImageFrame
              https://bugs.webkit.org/show_bug.cgi?id=52363
      
              RGBA32Buffer is a terrible misnomer.  ImageFrame is vastly
              more accurate.  More cleanup to come.
      
              * WebCore.pro:
              * platform/graphics/ImageSource.cpp:
              (WebCore::ImageSource::createFrameAtIndex):
              (WebCore::ImageSource::frameDurationAtIndex):
              (WebCore::ImageSource::frameIsCompleteAtIndex):
              * platform/graphics/qt/ImageDecoderQt.cpp:
              (WebCore::ImageDecoderQt::frameBufferAtIndex):
              (WebCore::ImageDecoderQt::internalReadImage):
              (WebCore::ImageDecoderQt::internalHandleCurrentImage):
              * platform/graphics/qt/ImageDecoderQt.h:
              * platform/graphics/wince/ImageWinCE.cpp:
              (WebCore::ImageFrame::asNewNativeImage):
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageFrame::ImageFrame):
              (WebCore::ImageFrame::operator=):
              (WebCore::ImageFrame::clear):
              (WebCore::ImageFrame::zeroFill):
              (WebCore::ImageFrame::copyReferenceToBitmapData):
              (WebCore::ImageFrame::copyBitmapData):
              (WebCore::ImageFrame::setSize):
              (WebCore::ImageFrame::hasAlpha):
              (WebCore::ImageFrame::setHasAlpha):
              (WebCore::ImageFrame::setColorProfile):
              (WebCore::ImageFrame::setStatus):
              (WebCore::ImageFrame::width):
              (WebCore::ImageFrame::height):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageFrame::ImageFrame):
              * platform/image-decoders/bmp/BMPImageDecoder.cpp:
              (WebCore::BMPImageDecoder::frameBufferAtIndex):
              (WebCore::BMPImageDecoder::decode):
              * platform/image-decoders/bmp/BMPImageDecoder.h:
              * platform/image-decoders/bmp/BMPImageReader.cpp:
              (WebCore::BMPImageReader::decodeBMP):
              * platform/image-decoders/bmp/BMPImageReader.h:
              (WebCore::BMPImageReader::setBuffer):
              * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
              (WebCore::ImageFrame::asNewNativeImage):
              * platform/image-decoders/cg/ImageDecoderCG.cpp:
              (WebCore::getPtrAsPixelData):
              (WebCore::ImageFrame::copyReferenceToBitmapData):
              (WebCore::ImageFrame::copyBitmapData):
              (WebCore::ImageFrame::setSize):
              (WebCore::ImageFrame::asNewNativeImage):
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::frameBufferAtIndex):
              (WebCore::GIFImageDecoder::clearFrameBufferCache):
              (WebCore::GIFImageDecoder::haveDecodedRow):
              (WebCore::GIFImageDecoder::frameComplete):
              (WebCore::GIFImageDecoder::initFrameBuffer):
              * platform/image-decoders/gif/GIFImageDecoder.h:
              * platform/image-decoders/gif/GIFImageReader.cpp:
              (GIFImageReader::read):
              * platform/image-decoders/gif/GIFImageReader.h:
              (GIFFrameReader::GIFFrameReader):
              * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
              (WebCore::ImageFrame::asNewNativeImage):
              * platform/image-decoders/ico/ICOImageDecoder.cpp:
              (WebCore::ICOImageDecoder::frameBufferAtIndex):
              (WebCore::ICOImageDecoder::decode):
              * platform/image-decoders/ico/ICOImageDecoder.h:
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageDecoder::frameBufferAtIndex):
              (WebCore::JPEGImageDecoder::outputScanlines):
              (WebCore::JPEGImageDecoder::jpegComplete):
              (WebCore::JPEGImageDecoder::decode):
              * platform/image-decoders/jpeg/JPEGImageDecoder.h:
              * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
              (WebCore::ImageFrame::asNewNativeImage):
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              (WebCore::PNGImageDecoder::frameBufferAtIndex):
              (WebCore::PNGImageDecoder::rowAvailable):
              (WebCore::PNGImageDecoder::pngComplete):
              * platform/image-decoders/png/PNGImageDecoder.h:
              (WebCore::PNGImageDecoder::isComplete):
              * platform/image-decoders/qt/ImageFrameQt.cpp: Copied from Source/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp.
              (WebCore::ImageFrame::ImageFrame):
              (WebCore::ImageFrame::operator=):
              (WebCore::ImageFrame::clear):
              (WebCore::ImageFrame::zeroFill):
              (WebCore::ImageFrame::copyBitmapData):
              (WebCore::ImageFrame::setSize):
              (WebCore::ImageFrame::asNewNativeImage):
              (WebCore::ImageFrame::hasAlpha):
              (WebCore::ImageFrame::setHasAlpha):
              (WebCore::ImageFrame::setColorProfile):
              (WebCore::ImageFrame::setStatus):
              (WebCore::ImageFrame::setPixmap):
              (WebCore::ImageFrame::width):
              (WebCore::ImageFrame::height):
              * platform/image-decoders/qt/RGBA32BufferQt.cpp: Removed.
              * platform/image-decoders/skia/ImageDecoderSkia.cpp:
              (WebCore::ImageFrame::ImageFrame):
              (WebCore::ImageFrame::operator=):
              (WebCore::ImageFrame::clear):
              (WebCore::ImageFrame::zeroFill):
              (WebCore::ImageFrame::copyBitmapData):
              (WebCore::ImageFrame::setSize):
              (WebCore::ImageFrame::asNewNativeImage):
              (WebCore::ImageFrame::hasAlpha):
              (WebCore::ImageFrame::setHasAlpha):
              (WebCore::ImageFrame::setColorProfile):
              (WebCore::ImageFrame::setStatus):
              (WebCore::ImageFrame::width):
              (WebCore::ImageFrame::height):
              * platform/image-decoders/webp/WEBPImageDecoder.cpp:
              (WebCore::WEBPImageDecoder::frameBufferAtIndex):
              (WebCore::WEBPImageDecoder::decode):
              * platform/image-decoders/webp/WEBPImageDecoder.h:
              * platform/image-decoders/wx/ImageDecoderWx.cpp:
              (WebCore::ImageFrame::asNewNativeImage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec499e3e
  11. 08 Jan, 2011 1 commit
  12. 10 Dec, 2010 1 commit
    • zmo@google.com's avatar
      2010-12-10 Zhenyao Mo <zmo@google.com> · da0531cf
      zmo@google.com authored
              Reviewed by Adam Barth.
      
              Use enums instead of booleans in ImageSource/ImageDecoder constructors
              https://bugs.webkit.org/show_bug.cgi?id=50818
      
              * src/WebImageDecoder.cpp:
              (WebKit::WebImageDecoder::init): Use enums instead of boolean in ImageDecoder constructor.
      2010-12-10  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Adam Barth.
      
              Use enums instead of booleans in ImageSource/ImageDecoder constructors
              https://bugs.webkit.org/show_bug.cgi?id=50818
      
              This patch basically defines two enum type in ImageSource: AlphaOption
              and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
              constructor parameters instead of boolean typs.
      
              * platform/graphics/ImageSource.cpp:
              (WebCore::ImageSource::ImageSource):
              (WebCore::ImageSource::setData):
              * platform/graphics/ImageSource.h: Define the two enum types.
              * platform/graphics/cg/GraphicsContext3DCG.cpp:
              (WebCore::GraphicsContext3D::getImageData):
              * platform/graphics/cg/ImageSourceCG.cpp:
              (WebCore::ImageSource::ImageSource):
              * platform/graphics/qt/ImageDecoderQt.cpp:
              (WebCore::ImageDecoder::create):
              (WebCore::ImageDecoderQt::ImageDecoderQt):
              * platform/graphics/qt/ImageDecoderQt.h:
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              (WebCore::GraphicsContext3D::getImageData):
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageDecoder::create):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageDecoder::ImageDecoder):
              * platform/image-decoders/bmp/BMPImageDecoder.cpp:
              (WebCore::BMPImageDecoder::BMPImageDecoder):
              * platform/image-decoders/bmp/BMPImageDecoder.h:
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::GIFImageDecoder):
              * platform/image-decoders/gif/GIFImageDecoder.h:
              * platform/image-decoders/ico/ICOImageDecoder.cpp:
              (WebCore::ICOImageDecoder::ICOImageDecoder):
              (WebCore::ICOImageDecoder::decodeAtIndex):
              * platform/image-decoders/ico/ICOImageDecoder.h:
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageDecoder::JPEGImageDecoder):
              * platform/image-decoders/jpeg/JPEGImageDecoder.h:
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              (WebCore::PNGImageDecoder::PNGImageDecoder):
              * platform/image-decoders/png/PNGImageDecoder.h:
              * platform/image-decoders/webp/WEBPImageDecoder.cpp:
              (WebCore::WEBPImageDecoder::WEBPImageDecoder):
              * platform/image-decoders/webp/WEBPImageDecoder.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da0531cf
  13. 02 Dec, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-12-02 Adam Barth <abarth@webkit.org> · bc0164a0
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Gray-scale JPEG images with a color profile are stretched horizonally
              https://bugs.webkit.org/show_bug.cgi?id=49950
      
              Turns out gray-scale JPEGs with color profiles have the same issue as
              PNGs.  As with PNGs, we suppress now suppress the color profile for
              gray-scale JPEGs.  Most importantly, this patch adds a test.
      
              Test: fast/images/gray-scale-jpeg-with-color-profile.html
      
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageReader::decode):
      2010-12-02  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Gray-scale JPEG images with a color profile are stretched horizonally
              https://bugs.webkit.org/show_bug.cgi?id=49950
      
              Test that we properly render gray-scale JPEGs with embedded color
              profiles.
      
              * fast/images/gray-scale-jpeg-with-color-profile.html: Added.
              * fast/images/resources/flowchart.jpg: Added.
              * platform/mac/fast/images/gray-scale-jpeg-with-color-profile-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc0164a0
  14. 18 Nov, 2010 1 commit
    • zmo@google.com's avatar
      2010-11-17 Zhenyao Mo <zmo@google.com> · e65a82f7
      zmo@google.com authored
              Reviewed by Kenneth Russell.
      
              Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=47196
      
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageDecoder::ignoresGammaAndColorProfile): Add a getter function for the ignoreGammaAndColorProfile setting.
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageReader::decode): Hookup ignoreGammaAndColorProfile setting with color profile processing.
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              (WebCore::PNGImageDecoder::headerAvailable): Ditto.
      2010-11-17  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=47196
      
              * fast/canvas/webgl/gl-teximage-expected.txt:
              * fast/canvas/webgl/gl-teximage.html: Add test cases for images with ICC profiles.
              * fast/canvas/webgl/resources/small-square-with-cie-rgb-profile.png: Added.
              * fast/canvas/webgl/resources/small-square-with-colormatch-profile.png: Added.
              * fast/canvas/webgl/resources/small-square-with-colorspin-profile.jpg: Added.
              * fast/canvas/webgl/resources/small-square-with-colorspin-profile.png: Added.
              * fast/canvas/webgl/resources/small-square-with-e-srgb-profile.png: Added.
              * fast/canvas/webgl/resources/small-square-with-smpte-c-profile.png: Added.
              * fast/canvas/webgl/resources/small-square-with-srgb-iec61966-2.1-profile.png: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e65a82f7
  15. 16 Nov, 2010 1 commit
    • zmo@google.com's avatar
      2010-11-11 Zhenyao Mo <zmo@google.com> · ac07f23e
      zmo@google.com authored
              Reviewed by Kenneth Russell.
      
              Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=47196
      
              * src/WebImageDecoder.cpp:
              (WebKit::WebImageDecoder::init): Add ignoreGammaAndColorProfile parameter.
      2010-11-11  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=47196
      
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::texImage2DImpl): Apply UNPACK_COLORSPACE_CONVERSION settings to image uploading.
              (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
              * platform/graphics/GraphicsContext3D.cpp:
              (WebCore::GraphicsContext3D::extractImageData): Ditto.
              * platform/graphics/GraphicsContext3D.h:
              * platform/graphics/ImageSource.cpp:
              (WebCore::ImageSource::ImageSource): Add ignoreGammaColorProfile parameter.
              (WebCore::ImageSource::setData): Ditto.
              * platform/graphics/ImageSource.h:
              * platform/graphics/cg/GraphicsContext3DCG.cpp:
              (WebCore::GraphicsContext3D::getImageData): Ditto.
              * platform/graphics/cg/ImageSourceCG.cpp:
              (WebCore::ImageSource::ImageSource): Ditto.
              * platform/graphics/qt/GraphicsContext3DQt.cpp:
              (WebCore::GraphicsContext3D::getImageData): Ditto.
              * platform/graphics/qt/ImageDecoderQt.cpp:
              (WebCore::ImageDecoder::create): Ditto.
              (WebCore::ImageDecoderQt::ImageDecoderQt): Ditto.
              * platform/graphics/qt/ImageDecoderQt.h:
              * platform/graphics/skia/GraphicsContext3DSkia.cpp:
              (WebCore::GraphicsContext3D::getImageData): Ditto.
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageDecoder::create): Ditto.
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageDecoder::ImageDecoder): Ditto.
              * platform/image-decoders/bmp/BMPImageDecoder.cpp:
              (WebCore::BMPImageDecoder::BMPImageDecoder):
              * platform/image-decoders/bmp/BMPImageDecoder.h:
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::GIFImageDecoder): Ditto.
              * platform/image-decoders/gif/GIFImageDecoder.h:
              * platform/image-decoders/ico/ICOImageDecoder.cpp:
              (WebCore::ICOImageDecoder::ICOImageDecoder): Ditto.
              (WebCore::ICOImageDecoder::decodeAtIndex): Ditto.
              * platform/image-decoders/ico/ICOImageDecoder.h:
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
              (WebCore::JPEGImageDecoder::JPEGImageDecoder): Ditto.
              * platform/image-decoders/jpeg/JPEGImageDecoder.h:
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              (WebCore::PNGImageDecoder::PNGImageDecoder): Ditto.
              (WebCore::PNGImageDecoder::headerAvailable): Ignore gamma settings if ignoreGammaAndColorProfile is true.
              * platform/image-decoders/png/PNGImageDecoder.h:
              * platform/image-decoders/webp/WEBPImageDecoder.cpp:
              (WebCore::WEBPImageDecoder::WEBPImageDecoder): Add ignoreGammaAndColorProfile parameter.
              * platform/image-decoders/webp/WEBPImageDecoder.h:
      2010-11-11  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Implement UNPACK_COLORSPACE_CONVERSION_WEBGL
              https://bugs.webkit.org/show_bug.cgi?id=47196
      
              * fast/canvas/webgl/gl-teximage-expected.txt:
              * fast/canvas/webgl/gl-teximage.html: Testing that if UNPACK_COLORSPACE_CONVERSION is NONE, gamma settings are not applied to images.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac07f23e
  16. 08 Nov, 2010 1 commit
  17. 01 Nov, 2010 3 commits
    • abarth@webkit.org's avatar
      2010-11-01 Adam Barth <abarth@webkit.org> · 84aa3a24
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              [Chromium] Add ICC support for PNG on Mac
              https://bugs.webkit.org/show_bug.cgi?id=48170
      
              This just pipes the ICC profile from libpng to CoreGraphics.  This
              patch would have been a lot prettier on Snow Leopard, but we have to
              use a somewhat ugly API to get this to work on Leopard.
      
              This is covered by about infinite tests.
      
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::RGBA32Buffer::setColorProfile):
              * 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:
              (WebCore::RGBA32Buffer::setColorProfile):
              * platform/image-decoders/skia/ImageDecoderSkia.cpp:
              (WebCore::RGBA32Buffer::setColorProfile):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84aa3a24
    • dimich@chromium.org's avatar
      2010-11-01 Sheriff Bot <webkit.review.bot@gmail.com> · 55372123
      dimich@chromium.org authored
              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:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55372123
    • abarth@webkit.org's avatar
      2010-10-31 Adam Barth <abarth@webkit.org> · 6e06aa03
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              [Chromium] Add ICC support for PNG on Mac
              https://bugs.webkit.org/show_bug.cgi?id=48170
      
              This just pipes the ICC profile from libpng to CoreGraphics.  This
              patch would have been a lot prettier on Snow Leopard, but we have to
              use a somewhat ugly API to get this to work on Leopard.
      
              This is covered by about infinite tests.
      
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::RGBA32Buffer::setColorProfile):
              * 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:
              (WebCore::RGBA32Buffer::setColorProfile):
              * platform/image-decoders/skia/ImageDecoderSkia.cpp:
              (WebCore::RGBA32Buffer::setColorProfile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e06aa03
  18. 29 Oct, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-10-28 Adam Barth <abarth@webkit.org> · d01e25a5
      abarth@webkit.org authored
              Reviewed by Eric Seidel, Peter Kasting, and Darin Fisher.
              (Eric reviewed the CoreGraphics interactions, Peter reviewed the image
              decoder interaction, and Darin Fisher SGTMed the policy decision.)
      
              [chromium] Chromium Mac should use WebKit's image decoders
              https://bugs.webkit.org/show_bug.cgi?id=47974
      
              Enable WebKit's image decoders.
      
              * features.gypi:
      2010-10-28  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel, Peter Kasting, and Darin Fisher.
              (Eric reviewed the CoreGraphics interactions, Peter reviewed the image
              decoder interaction, and Darin Fisher SGTMed the policy decision.)
      
              [chromium] Chromium Mac should use WebKit's image decoders
              https://bugs.webkit.org/show_bug.cgi?id=47974
      
              This patch teaches WebKit's image decoders how to talk to CoreGraphics.
              This patch doesn't handle color profiles, but that will come in a
              subsequent patch.
      
              * WebCore.gyp/WebCore.gyp:
              * WebCore.gypi:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::createImage):
              * platform/graphics/ImageSource.h:
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::RGBA32Buffer::clear):
              (WebCore::RGBA32Buffer::zeroFill):
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::getAddr):
              * platform/image-decoders/cg: Added.
              * platform/image-decoders/cg/ImageDecoderCG.cpp: Added.
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              (WebCore::RGBA32Buffer::asNewNativeImage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d01e25a5
  19. 23 Oct, 2010 1 commit
    • dglazkov@chromium.org's avatar
      2010-10-23 Dimitri Glazkov <dglazkov@chromium.org> · 38fc88a1
      dglazkov@chromium.org authored
              Unreviewed, rolling out r70369.
              http://trac.webkit.org/changeset/70369
              https://bugs.webkit.org/show_bug.cgi?id=47974
      
              Caused weird artifacts in expected results.
      
              * wtf/Platform.h:
      2010-10-23  Dimitri Glazkov  <dglazkov@chromium.org>
      
              Unreviewed, rolling out r70369.
              http://trac.webkit.org/changeset/70369
              https://bugs.webkit.org/show_bug.cgi?id=47974
      
              Caused weird artifacts in expected results.
      
              * WebCore.gyp/WebCore.gyp:
              * WebCore.gypi:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::createImage):
              * platform/graphics/ImageSource.h:
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::RGBA32Buffer::operator=):
              (WebCore::RGBA32Buffer::clear):
              (WebCore::RGBA32Buffer::zeroFill):
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::getAddr):
              * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
              (WebCore::RGBA32Buffer::asNewNativeImage):
              * platform/image-decoders/cg/ImageDecoderCG.cpp: Removed.
              * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
              (WebCore::RGBA32Buffer::asNewNativeImage):
              * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
              (WebCore::RGBA32Buffer::asNewNativeImage):
              * platform/image-decoders/wx/ImageDecoderWx.cpp:
              (WebCore::RGBA32Buffer::asNewNativeImage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38fc88a1
  20. 22 Oct, 2010 1 commit
    • abarth@webkit.org's avatar
      2010-10-21 Adam Barth <abarth@webkit.org> · ea8e8811
      abarth@webkit.org authored
              Reviewed by Eric Seidel, Peter Kasting, and Darin Fisher.
              (Eric reviewed the CoreGraphics interactions, Peter reviewed the image
              decoder interaction, and Darin Fisher SGTMed the policy decision.)
      
              [chromium] Chromium Mac should use WebKit's image decoders
              https://bugs.webkit.org/show_bug.cgi?id=47974
      
              This patch teaches WebKit's image decoders how to talk to CoreGraphics.
              This patch doesn't handle color profiles, but that will come in a
              subsequent patch.
      
              * WebCore.gyp/WebCore.gyp:
              * WebCore.gypi:
              * loader/CachedImage.cpp:
              (WebCore::CachedImage::createImage):
              * platform/graphics/ImageSource.h:
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::RGBA32Buffer::clear):
              (WebCore::RGBA32Buffer::zeroFill):
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::getAddr):
              * platform/image-decoders/cg: Added.
              * platform/image-decoders/cg/ImageDecoderCG.cpp: Added.
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              (WebCore::RGBA32Buffer::asNewNativeImage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea8e8811
  21. 27 Sep, 2010 1 commit
  22. 25 Aug, 2010 2 commits
    • zmo@google.com's avatar
      2010-08-24 Zhenyao Mo <zmo@google.com> · cf7ab461
      zmo@google.com authored
              Reviewed by Kenneth Russell.
      
              Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia)
              https://bugs.webkit.org/show_bug.cgi?id=38282
      
              * src/WebImageDecoder.cpp:
              (WebKit::WebImageDecoder::init): Add premultiplyAlpha flag.
      2010-08-24  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia)
              https://bugs.webkit.org/show_bug.cgi?id=38282
      
              Test: fast/canvas/webgl/gl-teximage.html
      
              * platform/graphics/GraphicsContext3D.cpp: Fix a bug where alpha channel is ignored.
              * platform/graphics/ImageSource.cpp: Add premultiplyAlpha flag.
              (WebCore::ImageSource::ImageSource):
              (WebCore::ImageSource::setData):
              * platform/graphics/ImageSource.h: Ditto.
              * platform/graphics/cg/ImageSourceCG.cpp: Ditto.
              (WebCore::ImageSource::ImageSource):
              * platform/graphics/qt/ImageDecoderQt.cpp: Ditto.
              (WebCore::ImageDecoder::create):
              (WebCore::ImageDecoderQt::ImageDecoderQt):
              (WebCore::ImageDecoderQt::frameCount):
              (WebCore::ImageDecoderQt::forceLoadEverything):
              * platform/graphics/qt/ImageDecoderQt.h: Ditto.
              * platform/graphics/skia/GraphicsContext3DSkia.cpp: Fix the premultiplyAlpha data loss issue in skia.
              (WebCore::GraphicsContext3D::getImageData):
              * platform/image-decoders/ImageDecoder.cpp: Add premultiplyAlpha flag.
              (WebCore::ImageDecoder::create):
              (WebCore::RGBA32Buffer::RGBA32Buffer):
              (WebCore::RGBA32Buffer::operator=):
              * platform/image-decoders/ImageDecoder.h: Ditto.
              (WebCore::RGBA32Buffer::premultiplyAlpha):
              (WebCore::RGBA32Buffer::setPremultiplyAlpha):
              (WebCore::RGBA32Buffer::setRGBA):
              (WebCore::ImageDecoder::ImageDecoder):
              * platform/image-decoders/bmp/BMPImageDecoder.cpp: Ditto.
              (WebCore::BMPImageDecoder::BMPImageDecoder):
              (WebCore::BMPImageDecoder::frameBufferAtIndex):
              * platform/image-decoders/bmp/BMPImageDecoder.h: Ditto.
              * platform/image-decoders/gif/GIFImageDecoder.cpp: Ditto.
              (WebCore::GIFImageDecoder::GIFImageDecoder):
              (WebCore::GIFImageDecoder::frameCount):
              * platform/image-decoders/gif/GIFImageDecoder.h: Ditto.
              * platform/image-decoders/ico/ICOImageDecoder.cpp: Ditto.
              (WebCore::ICOImageDecoder::ICOImageDecoder):
              (WebCore::ICOImageDecoder::frameCount):
              (WebCore::ICOImageDecoder::decodeAtIndex):
              * platform/image-decoders/ico/ICOImageDecoder.h: Ditto.
              * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
              (WebCore::JPEGImageDecoder::JPEGImageDecoder):
              (WebCore::JPEGImageDecoder::frameBufferAtIndex):
              * platform/image-decoders/jpeg/JPEGImageDecoder.h: Ditto.
              * platform/image-decoders/png/PNGImageDecoder.cpp: Ditto.
              (WebCore::PNGImageDecoder::PNGImageDecoder):
              (WebCore::PNGImageDecoder::frameBufferAtIndex):
              * platform/image-decoders/png/PNGImageDecoder.h: Ditto.
              * platform/image-decoders/skia/ImageDecoderSkia.cpp: Ditto.
              (WebCore::RGBA32Buffer::RGBA32Buffer):
              (WebCore::RGBA32Buffer::operator=):
      2010-08-24  Zhenyao Mo  <zmo@google.com>
      
              Reviewed by Kenneth Russell.
      
              Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia)
              https://bugs.webkit.org/show_bug.cgi?id=38282
      
              * fast/canvas/webgl/gl-teximage-expected.txt: Added.
              * fast/canvas/webgl/gl-teximage.html: Added.
              * fast/canvas/webgl/resources/3x3.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-256-with-128-alpha.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-256.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-default-gamma.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-gamma0.1.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-gamma1.0.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-gamma2.0.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-gamma4.0.png: Added.
              * fast/canvas/webgl/resources/gray-ramp-gamma9.0.png: Added.
              * fast/canvas/webgl/resources/gray-ramp.png: Added.
              * fast/canvas/webgl/resources/webgl-test-utils.js: Sync with khronos.
              (WebGLTestUtils):
              * fast/canvas/webgl/resources/zero-alpha.png: Added.
              * platform/chromium/test_expectations.txt: Don't run gl-teximage.html for mac.
              * platform/mac/Skipped: Don't run gl-teximage.html for mac.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf7ab461
    • loki@webkit.org's avatar
      Avoid increasing required alignment of target type warning · ed0d41db
      loki@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=43963
      
      Reviewed by Gavin Barraclough.
      
      Fix alignment warnings on Qt.
      
      WebCore: 
      
      * bridge/qt/qt_runtime.cpp:
      (JSC::Bindings::convertQVariantToValue):
      * platform/graphics/qt/ImageBufferQt.cpp:
      (WebCore::getImageData):
      (WebCore::putImageData):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::RGBA32Buffer::getAddr):
      * platform/text/qt/TextCodecQt.cpp:
      (WebCore::TextCodecQt::decode):
      
      WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::evaluateJavaScript):
      * Api/qwebframe.cpp:
      (QWebFrame::addToJavaScriptWindowObject):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed0d41db
  23. 22 Jun, 2010 1 commit
    • pkasting@chromium.org's avatar
      Override setFailed() in each image decoder to clean up any temporary · 6a8bcd2f
      pkasting@chromium.org authored
      objects.
      https://bugs.webkit.org/show_bug.cgi?id=35411
              
      Reviewed by Adam Barth.
      
      In a few cases, we need to be careful to avoid deleting objects until
      after they're no longer needed.  These cases usually mean some jumping
      through hoops, to the detriment of code simplicity.
      
      No layout tests because this does not change the visible output of
      decoding in any way.
      
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::setData):
      * platform/image-decoders/bmp/BMPImageDecoder.cpp:
      (WebCore::BMPImageDecoder::setFailed):
      (WebCore::BMPImageDecoder::decode):
      * platform/image-decoders/bmp/BMPImageDecoder.h:
      * platform/image-decoders/bmp/BMPImageReader.cpp:
      (WebCore::BMPImageReader::decodeBMP):
      (WebCore::BMPImageReader::readInfoHeaderSize):
      (WebCore::BMPImageReader::processInfoHeader):
      (WebCore::BMPImageReader::readInfoHeader):
      (WebCore::BMPImageReader::processBitmasks):
      (WebCore::BMPImageReader::processColorTable):
      (WebCore::BMPImageReader::processRLEData):
      (WebCore::BMPImageReader::processNonRLEData):
      * platform/image-decoders/bmp/BMPImageReader.h:
      (WebCore::BMPImageReader::):
      * platform/image-decoders/gif/GIFImageDecoder.cpp:
      (WebCore::GIFImageDecoder::setFailed):
      (WebCore::GIFImageDecoder::decode):
      * platform/image-decoders/gif/GIFImageDecoder.h:
      * platform/image-decoders/ico/ICOImageDecoder.cpp:
      (WebCore::ICOImageDecoder::setFailed):
      (WebCore::ICOImageDecoder::decode):
      * platform/image-decoders/ico/ICOImageDecoder.h:
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      (WebCore::JPEGImageReader::decode):
      (WebCore::JPEGImageDecoder::setFailed):
      (WebCore::JPEGImageDecoder::decode):
      * platform/image-decoders/jpeg/JPEGImageDecoder.h:
      * platform/image-decoders/png/PNGImageDecoder.cpp:
      (WebCore::PNGImageReader::decode):
      (WebCore::PNGImageDecoder::PNGImageDecoder):
      (WebCore::PNGImageDecoder::setFailed):
      (WebCore::PNGImageDecoder::headerAvailable):
      (WebCore::PNGImageDecoder::decode):
      * platform/image-decoders/png/PNGImageDecoder.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a8bcd2f
  24. 21 Jun, 2010 1 commit
    • eric@webkit.org's avatar
      2010-06-21 Benjamin Poulain <benjamin.poulain@nokia.com> · ba024a4e
      eric@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] Decode images directly to QPixmap
              https://bugs.webkit.org/show_bug.cgi?id=40797
      
              Decode images to QPixmap directly instead of QImage when possible.
              RGBA32Buffer transforms the pixmap back to image if
              necessary.
      
              This improve the performance with certain graphic system, and
              can reduce memory usage.
      
              * platform/graphics/qt/ImageDecoderQt.cpp:
              (WebCore::ImageDecoderQt::setData):
              (WebCore::ImageDecoderQt::internalHandleCurrentImage):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::getAddr):
              * platform/image-decoders/qt/RGBA32BufferQt.cpp:
              (WebCore::RGBA32Buffer::clear):
              (WebCore::RGBA32Buffer::zeroFill):
              (WebCore::RGBA32Buffer::copyBitmapData):
              (WebCore::RGBA32Buffer::setSize):
              (WebCore::RGBA32Buffer::asNewNativeImage):
              (WebCore::RGBA32Buffer::setPixmap):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba024a4e
  25. 15 Mar, 2010 1 commit
    • pkasting@chromium.org's avatar
      Clean up more bits of the open-source image decoders. In addition to · 6568f9aa
      pkasting@chromium.org authored
      simplifying things somewhat, this makes all the decoders the same in
      terms of how they construct "image reader" subclasses and init scale
      data.
      
      Reviewed by Adam Barth.
      
      https://bugs.webkit.org/show_bug.cgi?id=36040
      
      No functional change, so no tests.
      
      * platform/image-decoders/ImageDecoder.h: Reorder a few declarations to try and group/order members slightly better.
      (WebCore::ImageDecoder::ImageDecoder):
      * platform/image-decoders/gif/GIFImageDecoder.cpp: Move reader construction into decode().  Prep scale data in setSize().  Remove useless comment.
      (WebCore::GIFImageDecoder::setData):
      (WebCore::GIFImageDecoder::setSize):
      (WebCore::GIFImageDecoder::frameBufferAtIndex):
      (WebCore::GIFImageDecoder::decode):
      * platform/image-decoders/gif/GIFImageDecoder.h: Prep scale data in setSize().
      * platform/image-decoders/gif/GIFImageReader.cpp: Prep scale data in setSize().
      (GIFImageReader::read):
      * platform/image-decoders/ico/ICOImageDecoder.cpp: Shorten code.
      (WebCore::ICOImageDecoder::setSize):
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Fix style.  Move reader construction into decode().
      (WebCore::JPEGImageReader::close):
      (WebCore::JPEGImageReader::skipBytes):
      (WebCore::JPEGImageDecoder::decode):
      * platform/image-decoders/jpeg/JPEGImageDecoder.h: Move reader construction into decode().
      (WebCore::JPEGImageDecoder::filenameExtension):
      * platform/image-decoders/png/PNGImageDecoder.cpp: Move reader construction into decode().  Track completion on decoder, not reader.  Prep scale data in setSize().  Remove useless comment.
      (WebCore::PNGImageReader::PNGImageReader):
      (WebCore::PNGImageReader::close):
      (WebCore::PNGImageReader::decode):
      (WebCore::PNGImageDecoder::setSize):
      (WebCore::PNGImageDecoder::frameBufferAtIndex):
      (WebCore::PNGImageDecoder::headerAvailable):
      (WebCore::PNGImageDecoder::pngComplete):
      (WebCore::PNGImageDecoder::decode):
      * platform/image-decoders/png/PNGImageDecoder.h: Move reader construction into decode().  Track completion on decoder, not reader.  Prep scale data in setSize().
      (WebCore::PNGImageDecoder::filenameExtension):
      (WebCore::PNGImageDecoder::isComplete):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6568f9aa
  26. 08 Mar, 2010 1 commit
    • pkasting@chromium.org's avatar
      Clean up usage of m_failed in open-source image decoders, part 1. · 1cb59824
      pkasting@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=35411
              
      Reviewed by Adam Barth.
      
      Makes setFailed() virtual so subclasses can override it (none do yet) to
      do automatic cleanup on failure; makes it return a bool for easy
      tailcalling; makes failed() the only way to access m_failed so
      subclasses are assured setFailed() won't be bypassed.  Plus one or two
      other tiny cleanup bits.
      
      Overriding setFailed() is coming in a subsequent patch because it can be
      hairy and needs close review.
      
      No functional change, so no tests.
      
      * platform/graphics/qt/ImageDecoderQt.cpp:
      (WebCore::ImageDecoderQt::setData):
      (WebCore::ImageDecoderQt::frameBufferAtIndex):
      (WebCore::ImageDecoderQt::internalDecodeSize):
      (WebCore::ImageDecoderQt::internalReadImage):
      (WebCore::ImageDecoderQt::internalHandleCurrentImage):
      (WebCore::ImageDecoderQt::forceLoadEverything):
      (WebCore::ImageDecoderQt::clearPointers):
      * platform/graphics/qt/ImageDecoderQt.h:
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::ImageDecoder):
      (WebCore::ImageDecoder::setData):
      (WebCore::ImageDecoder::setSize):
      (WebCore::ImageDecoder::setFailed):
      (WebCore::ImageDecoder::failed):
      * platform/image-decoders/bmp/BMPImageDecoder.cpp:
      (WebCore::BMPImageDecoder::isSizeAvailable):
      (WebCore::BMPImageDecoder::frameBufferAtIndex):
      (WebCore::BMPImageDecoder::processFileHeader):
      * platform/image-decoders/gif/GIFImageDecoder.cpp:
      (WebCore::GIFImageDecoder::setData):
      (WebCore::GIFImageDecoder::isSizeAvailable):
      (WebCore::GIFImageDecoder::frameBufferAtIndex):
      (WebCore::GIFImageDecoder::decode):
      (WebCore::GIFImageDecoder::initFrameBuffer):
      * platform/image-decoders/ico/ICOImageDecoder.cpp:
      (WebCore::ICOImageDecoder::decodeAtIndex):
      (WebCore::ICOImageDecoder::processDirectory):
      (WebCore::ICOImageDecoder::processDirectoryEntries):
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      (WebCore::JPEGImageReader::decode):
      (WebCore::JPEGImageDecoder::setData):
      (WebCore::JPEGImageDecoder::isSizeAvailable):
      (WebCore::JPEGImageDecoder::frameBufferAtIndex):
      (WebCore::JPEGImageDecoder::outputScanlines):
      (WebCore::JPEGImageDecoder::decode):
      * platform/image-decoders/png/PNGImageDecoder.cpp:
      (WebCore::decodingFailed):
      (WebCore::PNGImageReader::decode):
      (WebCore::PNGImageDecoder::setData):
      (WebCore::PNGImageDecoder::isSizeAvailable):
      (WebCore::PNGImageDecoder::frameBufferAtIndex):
      (WebCore::PNGImageDecoder::headerAvailable):
      (WebCore::PNGImageDecoder::rowAvailable):
      (WebCore::PNGImageDecoder::decode):
      * platform/image-decoders/png/PNGImageDecoder.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1cb59824
  27. 18 Feb, 2010 1 commit
  28. 16 Feb, 2010 1 commit
    • pkasting@chromium.org's avatar
      Code cleanup in ImageDecoders; no functional change. · 910636f4
      pkasting@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=28751
      
      Reviewed by Adam Barth.
      
      * Make code mostly comply with the style guide (switch indenting, use of
        "!" vs. "== 0", don't unnecessarily wrap lines, etc.)
      * Eliminate m_allDataReceived in ICO/BMP decoders since it's in the
        base ImageDecoder class
      * Remove some useless or wrong comments, add others
      * Wrap comments at 80 columns (most already were) for
        consistency/readability
      * Avoid casts by using correct variable types
      * Consistent naming of decode() function/args
      * Shorter code in some places
      * Make declaration and definition order match
      
      * platform/graphics/qt/ImageDecoderQt.cpp:
      (WebCore::ImageDecoderQt::frameCount):
      (WebCore::ImageDecoderQt::frameBufferAtIndex):
      (WebCore::ImageDecoderQt::forceLoadEverything):
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::ImageDecoder::create):
      (WebCore::RGBA32Buffer::clear):
      (WebCore::RGBA32Buffer::setSize):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::RGBA32Buffer::):
      (WebCore::ImageDecoder::ImageDecoder):
      * platform/image-decoders/bmp/BMPImageDecoder.cpp:
      (WebCore::BMPImageDecoder::BMPImageDecoder):
      (WebCore::BMPImageDecoder::setData):
      (WebCore::BMPImageDecoder::isSizeAvailable):
      (WebCore::BMPImageDecoder::frameBufferAtIndex):
      (WebCore::BMPImageDecoder::decode):
      (WebCore::BMPImageDecoder::decodeHelper):
      (WebCore::BMPImageDecoder::processFileHeader):
      * platform/image-decoders/bmp/BMPImageDecoder.h:
      (WebCore::BMPImageDecoder::readUint32):
      * platform/image-decoders/bmp/BMPImageReader.cpp:
      (WebCore::BMPImageReader::BMPImageReader):
      (WebCore::BMPImageReader::decodeBMP):
      (WebCore::BMPImageReader::readInfoHeaderSize):
      (WebCore::BMPImageReader::processInfoHeader):
      (WebCore::BMPImageReader::readInfoHeader):
      (WebCore::BMPImageReader::isInfoHeaderValid):
      (WebCore::BMPImageReader::processBitmasks):
      (WebCore::BMPImageReader::processColorTable):
      (WebCore::BMPImageReader::processRLEData):
      (WebCore::BMPImageReader::processNonRLEData):
      * platform/image-decoders/bmp/BMPImageReader.h:
      (WebCore::BMPImageReader::readUint32):
      (WebCore::BMPImageReader::pastEndOfImage):
      (WebCore::BMPImageReader::readCurrentPixel):
      (WebCore::BMPImageReader::getComponent):
      (WebCore::BMPImageReader::getAlpha):
      (WebCore::BMPImageReader::setI):
      (WebCore::BMPImageReader::setRGBA):
      * platform/image-decoders/gif/GIFImageDecoder.cpp:
      (WebCore::GIFImageDecoder::GIFImageDecoder):
      (WebCore::GIFImageDecoder::setData):
      (WebCore::GIFImageDecoder::isSizeAvailable):
      (WebCore::GIFImageDecoder::frameCount):
      (WebCore::GIFImageDecoder::frameBufferAtIndex):
      (WebCore::GIFImageDecoder::clearFrameBufferCache):
      (WebCore::GIFImageDecoder::sizeNowAvailable):
      (WebCore::GIFImageDecoder::haveDecodedRow):
      (WebCore::GIFImageDecoder::frameComplete):
      (WebCore::GIFImageDecoder::decode):
      (WebCore::GIFImageDecoder::initFrameBuffer):
      * platform/image-decoders/gif/GIFImageDecoder.h:
      (WebCore::GIFImageDecoder::):
      (WebCore::GIFImageDecoder::filenameExtension):
      * platform/image-decoders/gif/GIFImageReader.cpp:
      (GIFImageReader::do_lzw):
      (GIFImageReader::read):
      * platform/image-decoders/gif/GIFImageReader.h:
      (GIFImageReader::~GIFImageReader):
      * platform/image-decoders/ico/ICOImageDecoder.cpp:
      (WebCore::ICOImageDecoder::ICOImageDecoder):
      (WebCore::ICOImageDecoder::~ICOImageDecoder):
      (WebCore::ICOImageDecoder::setData):
      (WebCore::ICOImageDecoder::isSizeAvailable):
      (WebCore::ICOImageDecoder::frameSizeAtIndex):
      (WebCore::ICOImageDecoder::frameCount):
      (WebCore::ICOImageDecoder::frameBufferAtIndex):
      (WebCore::ICOImageDecoder::compareEntries):
      (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
      (WebCore::ICOImageDecoder::decode):
      (WebCore::ICOImageDecoder::decodeDirectory):
      (WebCore::ICOImageDecoder::decodeAtIndex):
      (WebCore::ICOImageDecoder::processDirectoryEntries):
      (WebCore::ICOImageDecoder::readDirectoryEntry):
      * platform/image-decoders/ico/ICOImageDecoder.h:
      (WebCore::ICOImageDecoder::readUint16):
      (WebCore::ICOImageDecoder::readUint32):
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      (WebCore::):
      (WebCore::JPEGImageReader::JPEGImageReader):
      (WebCore::JPEGImageReader::skipBytes):
      (WebCore::JPEGImageReader::decode):
      (WebCore::error_exit):
      (WebCore::fill_input_buffer):
      (WebCore::term_source):
      (WebCore::JPEGImageDecoder::setData):
      (WebCore::JPEGImageDecoder::setSize):
      (WebCore::JPEGImageDecoder::frameBufferAtIndex):
      (WebCore::JPEGImageDecoder::jpegComplete):
      (WebCore::JPEGImageDecoder::decode):
      * platform/image-decoders/jpeg/JPEGImageDecoder.h:
      (WebCore::JPEGImageDecoder::filenameExtension):
      * platform/image-decoders/png/PNGImageDecoder.cpp:
      (WebCore::decodingFailed):
      (WebCore::decodingWarning):
      (WebCore::headerAvailable):
      (WebCore::rowAvailable):
      (WebCore::pngComplete):
      (WebCore::PNGImageReader::PNGImageReader):
      (WebCore::PNGImageReader::close):
      (WebCore::PNGImageReader::decode):
      (WebCore::PNGImageReader::createInterlaceBuffer):
      (WebCore::PNGImageDecoder::setData):
      (WebCore::PNGImageDecoder::frameBufferAtIndex):
      (WebCore::PNGImageDecoder::headerAvailable):
      (WebCore::PNGImageDecoder::rowAvailable):
      (WebCore::PNGImageDecoder::pngComplete):
      (WebCore::PNGImageDecoder::decode):
      * platform/image-decoders/png/PNGImageDecoder.h:
      (WebCore::PNGImageDecoder::filenameExtension):
      * platform/image-decoders/qt/RGBA32BufferQt.cpp:
      (WebCore::RGBA32Buffer::setDecodedImage):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      910636f4
  29. 26 Jan, 2010 1 commit
    • pkasting@chromium.org's avatar
      Handle broken images more correctly in the open-source image decoders. · 4cb9edb6
      pkasting@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=33747
      
      Reviewed by David Levin.
      
      No tests since Safari doesn't use these decoders and there's already a
      broken-image test in the tree.
      
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::createFrameAtIndex): No need to check isSizeAvailable() since size() is now always safe.
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::size): Don't assert that the bitmap is valid; we don't need a complete successful decode to be able to give info about the size.
      * platform/image-decoders/qt/RGBA32BufferQt.cpp:
      (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cb9edb6
  30. 14 Jan, 2010 1 commit
    • pkasting@chromium.org's avatar
      Simplify image decoders by making downsampling functions available at · d7a40034
      pkasting@chromium.org authored
      all times, allowing much duplicated logic to be collapsed.
      https://bugs.webkit.org/show_bug.cgi?id=28751
      
      Reviewed by Adam Barth.
      
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::setData):
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::ImageDecoder::prepareScaleDataIfNecessary):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::ImageDecoder):
      (WebCore::ImageDecoder::scaledSize):
      (WebCore::ImageDecoder::setMaxNumPixels):
      * platform/image-decoders/gif/GIFImageDecoder.cpp:
      (WebCore::GIFImageDecoder::sizeNowAvailable):
      (WebCore::GIFImageDecoder::initFrameBuffer):
      (WebCore::GIFImageDecoder::haveDecodedRow):
      (WebCore::GIFImageDecoder::frameComplete):
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      (WebCore::JPEGImageDecoder::setSize):
      (WebCore::JPEGImageDecoder::outputScanlines):
      * platform/image-decoders/jpeg/JPEGImageDecoder.h:
      * platform/image-decoders/png/PNGImageDecoder.cpp:
      (WebCore::PNGImageDecoder::headerAvailable):
      (WebCore::PNGImageDecoder::rowAvailable):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7a40034
  31. 12 Jan, 2010 1 commit
    • yong.li@torchmobile.com's avatar
      2009-11-23 Yong Li <yoli@rim.com> · 24c25544
      yong.li@torchmobile.com authored
              Reviewed by Adam Treat.
      
              Make GIF decoder support down-sampling
              https://bugs.webkit.org/show_bug.cgi?id=31806
      
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageDecoder::upperBoundScaledY):
              (WebCore::ImageDecoder::lowerBoundScaledY):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::scaledRect):
              (WebCore::RGBA32Buffer::setScaledRect):
              (WebCore::ImageDecoder::scaledSize):
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::sizeNowAvailable):
              (WebCore::GIFImageDecoder::initFrameBuffer):
              (WebCore::copyOnePixel):
              (WebCore::GIFImageDecoder::haveDecodedRow):
              (WebCore::GIFImageDecoder::frameComplete):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24c25544
  32. 05 Jan, 2010 1 commit
    • yong.li@torchmobile.com's avatar
      2010-01-05 Yong Li <yoli@rim.com> · d9b8e211
      yong.li@torchmobile.com authored
              Reviewed by Darin Adler.
      
              Make PNG image decoder work with segmented SharedBuffer
              https://bugs.webkit.org/show_bug.cgi?id=33213
      
              * platform/image-decoders/ImageDecoder.cpp:
              (WebCore::ImageDecoder::create):
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::ImageDecoder::ImageDecoder):
              (WebCore::ImageDecoder::isAllDataReceived):
              (WebCore::ImageDecoder::setData):
              * platform/image-decoders/png/PNGImageDecoder.cpp:
              (WebCore::PNGImageReader::PNGImageReader):
              (WebCore::PNGImageReader::close):
              (WebCore::PNGImageReader::currentBufferSize):
              (WebCore::PNGImageReader::setComplete):
              (WebCore::PNGImageReader::decode):
              (WebCore::PNGImageDecoder::decode):
              (WebCore::PNGImageDecoder::headerAvailable):
              (WebCore::PNGImageDecoder::pngComplete):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9b8e211
  33. 19 Nov, 2009 1 commit
    • zoltan@webkit.org's avatar
      Allow custom memory allocation control for the other part of platform directory in WebCore · 1a14d94d
      zoltan@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=31585
      
      Reviewed by Darin Adler.
      
      Inherits the following classes from FastAllocBase because these are
      instantiated by 'new':
      
      class RegularExpression    - instantiated at: WebCore/page/Frame.cpp:415
      class TransformationMatrix - instantiated at: WebCore/rendering/TransformState.cpp:62
      class Path                 - instantiated at: WebCore/html/HTMLAreaElement.cpp:73
      class FontPlatformData     - instantiated at: WebCore/platform/graphics/qt/FontCacheQt.cpp:188
      
      Inherits the following classes from Noncopyable because these are
      instantiated by 'new' and no need to be copyable:
      
      class Cursors                         - instantiated at: WebCore/platform/qt/CursorQt.cpp:146
      class NetworkStateNotifier            - instantiated at: WebCore/platform/network/NetworkStateNotifier.cpp:37
      struct CrossThreadResourceRequestData - instantiated at: WebCore/platform/network/ResourceRequestBase.cpp:71
      
      class ImageDecoder - its child class is instantiated at: WebCore/platform/graphics/qt/ImageDecoderQt.cpp:46
      class MediaPlayerPrivateInterface - its child class is instantiated at: WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:119
      
      * platform/graphics/MediaPlayerPrivate.h:
      * platform/graphics/Path.h:
      * platform/graphics/qt/FontPlatformData.h:
      * platform/graphics/transforms/TransformationMatrix.h:
      * platform/image-decoders/ImageDecoder.h:
      * platform/network/NetworkStateNotifier.h:
      * platform/network/ResourceRequestBase.h:
      * platform/qt/CursorQt.cpp:
      * platform/text/RegularExpression.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a14d94d
  34. 06 Oct, 2009 2 commits
    • hausmann@webkit.org's avatar
      [Qt] Change QImageReader usage in ImageDecoderQt · b725e002
      hausmann@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=27538
      
      Replace the ReadContext with another appoach to
      reading the image. Attempt to only read meta information
      like the image size and number of frames (for animations)
      first and then when the page is getting drawn decode
      the image with the QImageReader.
      
      This is a huge benefit on pages with many images and saves
      ~2GB of memory on the szeged image test page.
      
      * platform/graphics/qt/ImageDecoderQt.cpp:
      (WebCore::ImageDecoderQt::ImageDecoderQt):
      (WebCore::ImageDecoderQt::~ImageDecoderQt):
      (WebCore::ImageDecoderQt::setData):
      (WebCore::ImageDecoderQt::isSizeAvailable):
      (WebCore::ImageDecoderQt::frameCount):
      (WebCore::ImageDecoderQt::repetitionCount):
      (WebCore::ImageDecoderQt::filenameExtension):
      (WebCore::ImageDecoderQt::frameBufferAtIndex):
      (WebCore::ImageDecoderQt::clearFrameBufferCache):
      (WebCore::ImageDecoderQt::internalDecodeSize):
      (WebCore::ImageDecoderQt::internalReadImage):
      (WebCore::ImageDecoderQt::internalHandleCurrentImage):
      (WebCore::ImageDecoderQt::forceLoadEverything):
      (WebCore::ImageDecoderQt::failRead):
      * platform/graphics/qt/ImageDecoderQt.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b725e002
    • hausmann@webkit.org's avatar
      [Qt] Make use of RGBA32Buffer in ImageDecoderQt · 88b3eb33
      hausmann@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=27538
      
      Use the RGBA32Buffer instead of the internal ImageData
      to be able to use support of the base class, optionally
      support WebCore decoders for Qt and most importantly
      separate metadata and image data for better cache control.
      
      Remove ImageSourceQt as everything is now shared with
      the normal ImageSource.
      
      Change the ownership of the NativeImagePtr/QPixmap in
      ImageQt.cpp to delete the m_frame to be subject to cache
      control.
      
      * WebCore.pro:
      * platform/graphics/ImageSource.cpp:
      * platform/graphics/qt/ImageDecoderQt.cpp:
      (WebCore::ImageDecoderQt::ReadContext::ReadContext):
      (WebCore::ImageDecoderQt::ReadContext::read):
      (WebCore::ImageDecoderQt::ReadContext::readImageLines):
      (WebCore::ImageDecoderQt::ImageDecoderQt):
      (WebCore::ImageDecoderQt::setData):
      (WebCore::ImageDecoderQt::frameCount):
      (WebCore::ImageDecoderQt::frameBufferAtIndex):
      (WebCore::ImageDecoderQt::clearFrameBufferCache):
      * platform/graphics/qt/ImageDecoderQt.h:
      * platform/graphics/qt/ImageSourceQt.cpp: Removed.
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::RGBA32Buffer::decodedImage):
      (WebCore::RGBA32Buffer::getAddr):
      * platform/image-decoders/qt/RGBA32BufferQt.cpp: Added.
      (WebCore::RGBA32Buffer::RGBA32Buffer):
      (WebCore::RGBA32Buffer::setDecodedImage):
      (WebCore::RGBA32Buffer::clear):
      (WebCore::RGBA32Buffer::zeroFill):
      (WebCore::RGBA32Buffer::copyBitmapData):
      (WebCore::RGBA32Buffer::setSize):
      (WebCore::RGBA32Buffer::asNewNativeImage):
      (WebCore::RGBA32Buffer::hasAlpha):
      (WebCore::RGBA32Buffer::setHasAlpha):
      (WebCore::RGBA32Buffer::setStatus):
      (WebCore::RGBA32Buffer::operator=):
      (WebCore::RGBA32Buffer::width):
      (WebCore::RGBA32Buffer::height):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88b3eb33
  35. 28 Aug, 2009 1 commit
    • pkasting@chromium.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=27965 · a949efa6
      pkasting@chromium.org authored
      Move ImageDecoder creation function to a factory function on
      ImageDecoder.  This is arguably where it makes the most sense anyway,
      and it will (soon) allow ImageSourceQt.cpp to have one less dedicated
      function.
      
      Reviewed by Eric Seidel.
      
      * platform/graphics/ImageSource.cpp:
      * platform/graphics/qt/ImageDecoderQt.cpp:
      (WebCore::ImageDecoder::create):
      * platform/graphics/qt/ImageDecoderQt.h:
      * platform/graphics/qt/ImageSourceQt.cpp:
      (WebCore::ImageSource::setData):
      * platform/image-decoders/ImageDecoder.cpp:
      * platform/image-decoders/ImageDecoder.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a949efa6
  36. 27 Aug, 2009 1 commit
    • pkasting@chromium.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=28785 · b53e75ba
      pkasting@chromium.org authored
      Add ImageDecoder.cpp to various build files so platforms will be able to
      use it.  Move an ENABLE to not cover the whole file, in preparation for
      adding a bunch of code.  Simplify #ifdefs in ImageDecoder.h to be "Skia
      vs. everyone else", which also gives new platforms a reasonable default
      behavior.
      
      Reviewed by Eric Seidel.
      
      * GNUmakefile.am:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCoreSources.bkl:
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::):
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::RGBA32Buffer::getAddr):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b53e75ba