Unreviewed, rolling out r131810.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 22:24:32 +0000 (22:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 22:24:32 +0000 (22:24 +0000)
http://trac.webkit.org/changeset/131810
https://bugs.webkit.org/show_bug.cgi?id=99762

Broke linux debug webkit_unit_tests (Requested by
danakj|gardening on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-18

Source/WebCore:

* WebCore.gypi:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/ImageSource.h:
(WebCore):
(ImageSource):
* platform/graphics/chromium/DeferredImageDecoder.cpp: Removed.
* platform/graphics/chromium/DeferredImageDecoder.h: Removed.
* platform/graphics/chromium/ImageDecodingStore.cpp: Removed.
* platform/graphics/chromium/ImageDecodingStore.h: Removed.
* platform/graphics/chromium/ImageFrameGenerator.cpp: Removed.
* platform/graphics/chromium/ImageFrameGenerator.h: Removed.
* platform/graphics/chromium/LazyDecodingPixelRef.cpp: Removed.
* platform/graphics/chromium/LazyDecodingPixelRef.h: Removed.
* platform/graphics/chromium/ScaledImageFragment.cpp: Removed.
* platform/graphics/chromium/ScaledImageFragment.h: Removed.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::resizedBitmap):
* platform/image-decoders/ImageDecoder.h:
(ImageFrame):

Source/WebKit/chromium:

* WebKit.gypi:
* public/WebSettings.h:
* src/WebKit.cpp:
(WebKit::shutdown):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::WebSettingsImpl):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* tests/DeferredImageDecoderTest.cpp: Removed.
* tests/MockImageDecoder.h: Removed.

Tools:

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetWebSettings):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.virtual_test_suites):

LayoutTests:

* platform/chromium/TestExpectations:
* platform/chromium/virtual/deferred/fast/images/README.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131815 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/chromium/virtual/deferred/fast/images/README.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/ImageSource.cpp
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.h [deleted file]
Source/WebCore/platform/graphics/chromium/ImageDecodingStore.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/ImageDecodingStore.h [deleted file]
Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.h [deleted file]
Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.h [deleted file]
Source/WebCore/platform/graphics/chromium/ScaledImageFragment.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/ScaledImageFragment.h [deleted file]
Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp
Source/WebCore/platform/image-decoders/ImageDecoder.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/src/WebKit.cpp
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h
Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp [deleted file]
Source/WebKit/chromium/tests/MockImageDecoder.h [deleted file]
Tools/ChangeLog
Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/chromium/TestShell.h
Tools/DumpRenderTree/chromium/WebPreferences.cpp
Tools/DumpRenderTree/chromium/WebPreferences.h
Tools/Scripts/webkitpy/layout_tests/port/chromium.py

index 4c2df7529b45a3de65a0c97839b80ec5b96b5387..e023cb232e5011d905dfcae4cc68c49438450c7a 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r131810.
+        http://trac.webkit.org/changeset/131810
+        https://bugs.webkit.org/show_bug.cgi?id=99762
+
+        Broke linux debug webkit_unit_tests (Requested by
+        danakj|gardening on #webkit).
+
+        * platform/chromium/TestExpectations:
+        * platform/chromium/virtual/deferred/fast/images/README.txt: Removed.
+
 2012-10-18  Mike West  <mkwst@chromium.org>
 
         Add layout tests for wildcarded hosts in CSP directives.
index 63e59fbb271c80c7640bbd658474a42ba6d7f636..0fc2b443dff0ce54f77325b77464737f7bc36c88 100644 (file)
@@ -4233,28 +4233,3 @@ webkit.org/b/84893 http/tests/w3c/webperf/submission/Intel/user-timing [ Skip ]
 # Expected to fail until WebGL extension implementation lands
 webkit.org/b/98257 fast/canvas/webgl/oes-element-index-uint.html [ Failure Pass ]
 webkit.org/b/98257 platform/chromium/virtual/gpu/fast/canvas/webgl/oes-element-index-uint.html [ Failure Pass ]
-
-# These tests are failing already and because of virtual test suite for deferred
-# image decoding they need to be suppressed again.
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/animated-gif-restored-from-bfcache.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/exif-orientation-css.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/exif-orientation.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/pdf-as-image-landscape.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/pdf-as-image.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/support-broken-image-delegate.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/color-jpeg-with-color-profile.html [ ImageOnlyFailure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/gif-large-checkerboard.html [ ImageOnlyFailure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/gif-loop-count.html [ ImageOnlyFailure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/paint-subrect-grid.html [ ImageOnlyFailure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/pixel-crack-image-background-webkit-transform-scale.html [ ImageOnlyFailure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/embed-image.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/favicon-as-image.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-circle-focus-ring.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-polygon-focus-ring.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/object-image.html [ Failure ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/repaint-subrect-grid.html [ Timeout ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/paletted-png-with-color-profile.html [ Missing ]
-webkit.org/b/94240 platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zoom.html [ Failure ]
diff --git a/LayoutTests/platform/chromium/virtual/deferred/fast/images/README.txt b/LayoutTests/platform/chromium/virtual/deferred/fast/images/README.txt
deleted file mode 100644 (file)
index bf882eb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# Test suites in this directory test the 'deferred image decoding' code path
-# through Chromium DRT.
index 57bbd9da5605bb949e7c4162272e5200e5e55925..8a110011a4d99be5708eb8eb0d6d2447a4ffd645 100755 (executable)
@@ -1,3 +1,33 @@
+2012-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r131810.
+        http://trac.webkit.org/changeset/131810
+        https://bugs.webkit.org/show_bug.cgi?id=99762
+
+        Broke linux debug webkit_unit_tests (Requested by
+        danakj|gardening on #webkit).
+
+        * WebCore.gypi:
+        * platform/graphics/ImageSource.cpp:
+        (WebCore::ImageSource::setData):
+        * platform/graphics/ImageSource.h:
+        (WebCore):
+        (ImageSource):
+        * platform/graphics/chromium/DeferredImageDecoder.cpp: Removed.
+        * platform/graphics/chromium/DeferredImageDecoder.h: Removed.
+        * platform/graphics/chromium/ImageDecodingStore.cpp: Removed.
+        * platform/graphics/chromium/ImageDecodingStore.h: Removed.
+        * platform/graphics/chromium/ImageFrameGenerator.cpp: Removed.
+        * platform/graphics/chromium/ImageFrameGenerator.h: Removed.
+        * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Removed.
+        * platform/graphics/chromium/LazyDecodingPixelRef.h: Removed.
+        * platform/graphics/chromium/ScaledImageFragment.cpp: Removed.
+        * platform/graphics/chromium/ScaledImageFragment.h: Removed.
+        * platform/graphics/skia/NativeImageSkia.cpp:
+        (WebCore::NativeImageSkia::resizedBitmap):
+        * platform/image-decoders/ImageDecoder.h:
+        (ImageFrame):
+
 2012-10-18  Tommy Widenflycht  <tommyw@google.com>
 
         MediaStream API: Do some cleanup in the chromium WebKit API
index 48a1dcb3f5ca84241109400fff94ccb21326a704..9019604dce8adcef98cd63bccfae914b4a15d376 100644 (file)
             'platform/graphics/chromium/CompositorHUDFontAtlas.h',
             'platform/graphics/chromium/CrossProcessFontLoading.h',
             'platform/graphics/chromium/CrossProcessFontLoading.mm',
-            'platform/graphics/chromium/DeferredImageDecoder.cpp',
-            'platform/graphics/chromium/DeferredImageDecoder.h',
             'platform/graphics/chromium/DrawingBufferChromium.cpp',
             'platform/graphics/chromium/Extensions3DChromium.h',
             'platform/graphics/chromium/FontCacheAndroid.cpp',
             'platform/graphics/chromium/IconChromiumAndroid.cpp',
             'platform/graphics/chromium/ImageBufferDataSkia.h',
             'platform/graphics/chromium/ImageChromium.cpp',
-            'platform/graphics/chromium/ImageDecodingStore.cpp',
-            'platform/graphics/chromium/ImageDecodingStore.h',
-            'platform/graphics/chromium/ImageFrameGenerator.cpp',
-            'platform/graphics/chromium/ImageFrameGenerator.h',
-            'platform/graphics/chromium/LazyDecodingPixelRef.cpp',
-            'platform/graphics/chromium/LazyDecodingPixelRef.h',
             'platform/graphics/chromium/MediaPlayerPrivateChromium.h',
             'platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp',
             'platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h',
             'platform/graphics/chromium/PlatformIcon.h',
-            'platform/graphics/chromium/ScaledImageFragment.cpp',
-            'platform/graphics/chromium/ScaledImageFragment.h',
             'platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
             'platform/graphics/chromium/TransparencyWin.cpp',
             'platform/graphics/chromium/TransparencyWin.h',
index abfa5988b42bc690f7eabc953eeb07d053003c4c..82dfde1c9dd82e315bbdd9ee89cd0823c9cc8e4d 100644 (file)
 #include "NotImplemented.h"
 #include "PlatformMemoryInstrumentation.h"
 
-#if PLATFORM(CHROMIUM)
-#include "DeferredImageDecoder.h"
-#endif
-
 namespace WebCore {
 
 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
@@ -83,7 +79,7 @@ void ImageSource::setData(SharedBuffer* data, bool allDataReceived)
     // If insufficient bytes are available to determine the image type, no decoder plugin will be
     // made.
     if (!m_decoder) {
-        m_decoder = static_cast<NativeImageDecoderPtr>(NativeImageDecoder::create(*data, m_alphaOption, m_gammaAndColorProfileOption));
+        m_decoder = static_cast<NativeImageSourcePtr>(ImageDecoder::create(*data, m_alphaOption, m_gammaAndColorProfileOption));
 #if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
         if (m_decoder && s_maxPixelsPerDecodedImage)
             m_decoder->setMaxNumPixels(s_maxPixelsPerDecodedImage);
index 66a8a0a51c39fb9268b221a47b687501593bc4a3..0d8a01e26a72cfff39aa4654374144a0a179ac38 100644 (file)
@@ -47,20 +47,10 @@ class IntSize;
 class SharedBuffer;
 
 #if USE(CG)
-typedef CGImageSourceRef NativeImageDecoderPtr;
-#elif !PLATFORM(CHROMIUM)
-class ImageDecoder;
-typedef ImageDecoder* NativeImageDecoderPtr;
-#endif
-
-#if PLATFORM(CHROMIUM)
-class DeferredImageDecoder;
-typedef DeferredImageDecoder NativeImageDecoder;
-typedef DeferredImageDecoder* NativeImageDecoderPtr;
-#elif USE(CG)
-#define NativeImageDecoder ImageDecoder
+typedef CGImageSourceRef NativeImageSourcePtr;
 #else
-typedef ImageDecoder NativeImageDecoder;
+class ImageDecoder;
+typedef ImageDecoder* NativeImageSourcePtr;
 #endif
 
 // Right now GIFs are the only recognized image format that supports animation.
@@ -168,7 +158,7 @@ public:
     void reportMemoryUsage(MemoryObjectInfo*) const;
 
 private:
-    NativeImageDecoderPtr m_decoder;
+    NativeImageSourcePtr m_decoder;
 
 #if !USE(CG)
     AlphaOption m_alphaOption;
diff --git a/Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.cpp b/Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.cpp
deleted file mode 100644 (file)
index 7574196..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DeferredImageDecoder.h"
-
-#include "ImageDecodingStore.h"
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-DeferredImageDecoder::DeferredImageDecoder(ImageDecoder* actualDecoder)
-    : m_allDataReceived(false)
-    , m_actualDecoder(adoptPtr(actualDecoder))
-{
-}
-
-DeferredImageDecoder::~DeferredImageDecoder()
-{
-    // FIXME: Remove the corresponding entry in ImageDecodingStore if image
-    // is defer-decoded.
-}
-
-DeferredImageDecoder* DeferredImageDecoder::create(const SharedBuffer& data, ImageSource::AlphaOption alphaOption, ImageSource::GammaAndColorProfileOption gammaAndColorOption)
-{
-    ImageDecoder* actualDecoder = ImageDecoder::create(data, alphaOption, gammaAndColorOption);
-    return actualDecoder ? new DeferredImageDecoder(actualDecoder) : 0;
-}
-
-PassOwnPtr<DeferredImageDecoder> DeferredImageDecoder::createForTesting(PassOwnPtr<ImageDecoder> decoder)
-{
-    return adoptPtr(new DeferredImageDecoder(decoder.leakPtr()));
-}
-
-String DeferredImageDecoder::filenameExtension() const
-{
-    return m_actualDecoder ? m_actualDecoder->filenameExtension() : m_filenameExtension;
-}
-
-ImageFrame* DeferredImageDecoder::frameBufferAtIndex(size_t index)
-{
-    // Only defer image decoding if this is a single frame image. The reason is
-    // because a multiframe is usually animated GIF. Animation is handled by
-    // BitmapImage which uses some metadata functions that do synchronous image
-    // decoding.
-    if (ImageDecodingStore::instanceOnMainThread()
-        && m_actualDecoder
-        && m_actualDecoder->repetitionCount() == cAnimationNone
-        && m_actualDecoder->isSizeAvailable()) {
-
-        m_size = m_actualDecoder->size();
-        m_filenameExtension = m_actualDecoder->filenameExtension();
-
-        SkBitmap lazyDecodedSkBitmap = ImageDecodingStore::instanceOnMainThread()->createLazyDecodedSkBitmap(m_actualDecoder.release());
-        m_lazyDecodedFrame.setSkBitmap(lazyDecodedSkBitmap);
-        ImageDecodingStore::instanceOnMainThread()->setData(m_lazyDecodedFrame.getSkBitmap(), m_data.release(), m_allDataReceived);
-
-        // Don't mark the frame as completely decoded until the underlying
-        // decoder has really decoded it. Until then, our data and metadata may
-        // be incorrect, so callers can't rely on them.
-        m_lazyDecodedFrame.setStatus(ImageFrame::FramePartial);
-    }
-
-    return m_actualDecoder ? m_actualDecoder->frameBufferAtIndex(index) : &m_lazyDecodedFrame;
-}
-
-void DeferredImageDecoder::setData(SharedBuffer* data, bool allDataReceived)
-{
-    if (m_actualDecoder) {
-        // Keep a reference to data until image decoding is deferred.
-        // When image decoding is deferred then ownership of m_data is
-        // transferred to ImageDecodingStore.
-        m_data = data;
-        m_allDataReceived = allDataReceived;
-        m_actualDecoder->setData(data, allDataReceived);
-    } else {
-        ASSERT(!m_data);
-        ImageDecodingStore::instanceOnMainThread()->setData(m_lazyDecodedFrame.getSkBitmap(), data, allDataReceived);
-    }
-}
-
-bool DeferredImageDecoder::isSizeAvailable()
-{
-    // m_actualDecoder is 0 only if image decoding is deferred and that
-    // means image header decoded successfully and size is available.
-    return m_actualDecoder ? m_actualDecoder->isSizeAvailable() : true;
-}
-
-IntSize DeferredImageDecoder::size() const
-{
-    return m_actualDecoder ? m_actualDecoder->size() : m_size;
-}
-
-IntSize DeferredImageDecoder::frameSizeAtIndex(size_t index) const
-{
-    return m_actualDecoder ? m_actualDecoder->frameSizeAtIndex(index) : m_size;
-}
-
-size_t DeferredImageDecoder::frameCount()
-{
-    return m_actualDecoder ? m_actualDecoder->frameCount() : 1;
-}
-
-int DeferredImageDecoder::repetitionCount() const
-{
-    return m_actualDecoder ? m_actualDecoder->repetitionCount() : cAnimationNone;
-}
-
-void DeferredImageDecoder::clearFrameBufferCache(size_t clearBeforeFrame)
-{
-    // If image decoding is deferred then frame buffer cache is managed by
-    // the compositor and this call is ignored.
-    if (m_actualDecoder)
-        m_actualDecoder->clearFrameBufferCache(clearBeforeFrame);
-}
-
-bool DeferredImageDecoder::frameHasAlphaAtIndex(size_t index) const
-{
-    // FIXME: Synchronize this state with ImageDecodingStore when image is
-    // actually decoded. Return true here is correct in terms of rendering but
-    // may not go through some optimized rendering code path.
-    return m_actualDecoder ? m_actualDecoder->frameHasAlphaAtIndex(index) : true;
-}
-
-unsigned DeferredImageDecoder::frameBytesAtIndex(size_t index) const
-{
-    // If frame decoding is deferred then it is not managed by MemoryCache
-    // so return 0 here.
-    return m_actualDecoder ? m_actualDecoder->frameBytesAtIndex(index) : 0;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.h b/Source/WebCore/platform/graphics/chromium/DeferredImageDecoder.h
deleted file mode 100644 (file)
index 6b33fe3..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DeferredImageDecoder_h
-#define DeferredImageDecoder_h
-
-#include "ImageDecoder.h"
-#include "ImageSource.h"
-#include "IntSize.h"
-#include "SkBitmap.h"
-
-namespace WebCore {
-
-class SharedBuffer;
-
-class DeferredImageDecoder {
-public:
-    ~DeferredImageDecoder();
-    static DeferredImageDecoder* create(const SharedBuffer& data, ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption);
-
-    static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDecoder>);
-
-    String filenameExtension() const;
-
-    ImageFrame* frameBufferAtIndex(size_t index);
-
-    void setData(SharedBuffer* data, bool allDataReceived);
-
-    bool isSizeAvailable();
-    IntSize size() const;
-    IntSize frameSizeAtIndex(size_t index) const;
-    size_t frameCount();
-    int repetitionCount() const;
-    void clearFrameBufferCache(size_t);
-    bool frameHasAlphaAtIndex(size_t index) const;
-    unsigned frameBytesAtIndex(size_t index) const;
-
-private:
-    explicit DeferredImageDecoder(ImageDecoder* actualDecoder);
-
-    RefPtr<SharedBuffer> m_data;
-    bool m_allDataReceived;
-    OwnPtr<ImageDecoder> m_actualDecoder;
-
-    String m_filenameExtension;
-    IntSize m_size;
-
-    ImageFrame m_lazyDecodedFrame;
-};
-
-} // namespace WebCore
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/ImageDecodingStore.cpp b/Source/WebCore/platform/graphics/chromium/ImageDecodingStore.cpp
deleted file mode 100644 (file)
index 02790df..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ImageDecodingStore.h"
-
-#include "ImageDecoder.h"
-#include "ImageFrameGenerator.h"
-#include "LazyDecodingPixelRef.h"
-#include "ScaledImageFragment.h"
-#include "SkRect.h"
-#include "SkSize.h"
-
-#include "skia/ext/image_operations.h"
-
-#include <wtf/MainThread.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-namespace {
-
-// URI label for a lazily decoded SkPixelRef.
-const char labelLazyDecoded[] = "lazy";
-
-ImageDecodingStore* s_instanceOnMainThread = 0;
-
-static void setInstanceOnMainThread(ImageDecodingStore* imageDecodingStore)
-{
-    delete s_instanceOnMainThread;
-    s_instanceOnMainThread = imageDecodingStore;
-}
-} // namespace
-
-ImageDecodingStore::ImageDecodingStore()
-{
-}
-
-ImageDecodingStore::~ImageDecodingStore()
-{
-}
-
-ImageDecodingStore* ImageDecodingStore::instanceOnMainThread()
-{
-    ASSERT(isMainThread());
-    return s_instanceOnMainThread;
-}
-
-void ImageDecodingStore::initializeOnMainThread()
-{
-    ASSERT(isMainThread());
-    setInstanceOnMainThread(ImageDecodingStore::create().leakPtr());
-}
-
-void ImageDecodingStore::shutdown()
-{
-    ASSERT(isMainThread());
-    setInstanceOnMainThread(0);
-}
-
-bool ImageDecodingStore::isLazyDecoded(const SkBitmap& bitmap)
-{
-    return bitmap.pixelRef()
-        && bitmap.pixelRef()->getURI()
-        && !memcmp(bitmap.pixelRef()->getURI(), labelLazyDecoded, sizeof(labelLazyDecoded));
-}
-
-SkBitmap ImageDecodingStore::createLazyDecodedSkBitmap(PassOwnPtr<ImageDecoder> decoder)
-{
-    ASSERT(calledOnValidThread());
-
-    SkISize fullSize = SkISize::Make(decoder->size().width(), decoder->size().height());
-    ASSERT(!fullSize.isEmpty());
-
-    SkIRect fullRect = SkIRect::MakeSize(fullSize);
-
-    // Creates a lazily decoded SkPixelRef that references the entire image without scaling.
-    SkBitmap bitmap;
-    bitmap.setConfig(SkBitmap::kARGB_8888_Config, fullSize.width(), fullSize.height());
-    bitmap.setPixelRef(new LazyDecodingPixelRef(ImageFrameGenerator::create(decoder), fullSize, fullRect))->unref();
-
-    // Use URI to identify this is a lazily decoded SkPixelRef of type LazyDecodingPixelRef.
-    // FIXME: Give the actual URI is more useful.
-    bitmap.pixelRef()->setURI(labelLazyDecoded);
-
-    // Inform the bitmap that we will never change the pixels. This is a performance hint
-    // subsystems that may try to cache this bitmap (e.g. pictures, pipes, gpu, pdf, etc.)
-    bitmap.setImmutable();
-
-    // FIXME: Setting bitmap.setIsOpaque() is big performance gain if possible. We can
-    // do so safely if the image is fully loaded and it is a JPEG image, or image was
-    // decoded before.
-
-    return bitmap;
-}
-
-SkBitmap ImageDecodingStore::resizeLazyDecodedSkBitmap(const SkBitmap& bitmap, const SkISize& scaledSize, const SkIRect& scaledSubset)
-{
-    ASSERT(calledOnValidThread());
-
-    LazyDecodingPixelRef* pixelRef = static_cast<LazyDecodingPixelRef*>(bitmap.pixelRef());
-    ASSERT(!pixelRef->isScaled(pixelRef->frameGenerator()->fullSize()) && !pixelRef->isClipped());
-
-    int rowBytes = 0;
-    rowBytes = SkBitmap::ComputeRowBytes(SkBitmap::kARGB_8888_Config, scaledSize.width());
-
-    SkBitmap resizedBitmap;
-    resizedBitmap.setConfig(SkBitmap::kARGB_8888_Config, scaledSubset.width(), scaledSubset.height(), rowBytes);
-    resizedBitmap.setPixelRef(new LazyDecodingPixelRef(pixelRef->frameGenerator(), scaledSize, scaledSubset))->unref();
-
-    // See comments in createLazyDecodedSkBitmap().
-    resizedBitmap.setImmutable();
-    return resizedBitmap;
-}
-
-void ImageDecodingStore::setData(const SkBitmap& bitmap, PassRefPtr<SharedBuffer> data, bool allDataReceived)
-{
-    ASSERT(calledOnValidThread());
-    if (isLazyDecoded(bitmap))
-        static_cast<LazyDecodingPixelRef*>(bitmap.pixelRef())->frameGenerator()->setData(data, allDataReceived);
-}
-
-void* ImageDecodingStore::lockPixels(PassRefPtr<ImageFrameGenerator> frameGenerator, const SkISize& scaledSize, const SkIRect& scaledSubset)
-{
-    ASSERT(calledOnValidThread());
-    ASSERT(m_lockedSkBitmap.isNull());
-
-    SkISize fullSize = frameGenerator->fullSize();
-
-    // The cache only saves the full size image at the moment.
-    ScaledImageFragment* frameCache = lookupFrameCache(frameGenerator->imageId(), fullSize);
-    SkBitmap bitmap;
-
-    if (!frameCache) {
-        // FIXME: Pixels are owned by the ImageDecoder in the generator. Find
-        // a way to transfer ownership to our cache.
-        ImageFrame* frame = frameGenerator->decoder()->frameBufferAtIndex(0);
-
-        // Saves the frame in cache if this is complete.
-        if (frame->status() == ImageFrame::FrameComplete) {
-            m_frameCache.append(ScaledImageFragment::create(frameGenerator->imageId(), fullSize, frame->getSkBitmap(), true));
-        } else if (frame->status() == ImageFrame::FrameEmpty) {
-            // FIXME: If this is a decoding error. Report this to BitmapImage.
-            return 0;
-        }
-
-        bitmap = frame->getSkBitmap();
-    } else {
-        ASSERT(frameCache->isComplete());
-        bitmap = frameCache->bitmap();
-    }
-
-    if (fullSize != scaledSize) {
-        // Image scaling is done on-the-fly and scaled image is destroyed
-        // after use.
-        // FIXME: Resize just the requested fragment.
-        m_lockedSkBitmap = skia::ImageOperations::Resize(bitmap, skia::ImageOperations::RESIZE_LANCZOS3, scaledSize.width(), scaledSize.height());
-    } else
-        m_lockedSkBitmap = bitmap;
-    m_lockedSkBitmap.lockPixels();
-    return m_lockedSkBitmap.getAddr(scaledSubset.x(), scaledSubset.y());
-}
-
-void ImageDecodingStore::unlockPixels()
-{
-    ASSERT(calledOnValidThread());
-
-    m_lockedSkBitmap.unlockPixels();
-    m_lockedSkBitmap.reset();
-}
-
-void ImageDecodingStore::frameGeneratorBeingDestroyed(ImageFrameGenerator* frameGenerator)
-{
-    ASSERT(calledOnValidThread());
-
-    deleteFrameCache(frameGenerator->imageId());
-}
-
-bool ImageDecodingStore::calledOnValidThread() const
-{
-    return this == instanceOnMainThread() && isMainThread();
-}
-
-ScaledImageFragment* ImageDecodingStore::lookupFrameCache(int imageId, const SkISize& scaledSize) const
-{
-    for (size_t i = 0; i < m_frameCache.size(); ++i) {
-        if (m_frameCache[i]->isEqual(imageId, scaledSize))
-            return m_frameCache[i].get();
-    }
-    return 0;
-}
-
-void ImageDecodingStore::deleteFrameCache(int imageId)
-{
-    for (size_t i = 0; i < m_frameCache.size(); ++i) {
-        if (m_frameCache[i]->isEqual(imageId)) {
-            m_frameCache.remove(i);
-            return;
-        }
-    }
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/chromium/ImageDecodingStore.h b/Source/WebCore/platform/graphics/chromium/ImageDecodingStore.h
deleted file mode 100644 (file)
index a6a5d92..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ImageDecodingStore_h
-#define ImageDecodingStore_h
-
-#include "SkBitmap.h"
-#include "SkRect.h"
-#include "SkSize.h"
-
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class ImageDecoder;
-class ImageFrameGenerator;
-class ScaledImageFragment;
-class SharedBuffer;
-
-// This class can only be instantiated on main thread. There will be an
-// instance on impl thread in the future but that part of implementation
-// is incomplete. See bug: https://bugs.webkit.org/show_bug.cgi?id=94240
-// for details.
-class ImageDecodingStore {
-public:
-    static PassOwnPtr<ImageDecodingStore> create() { return adoptPtr(new ImageDecodingStore); }
-    ~ImageDecodingStore();
-
-    static ImageDecodingStore* instanceOnMainThread();
-    static void initializeOnMainThread();
-    static void shutdown();
-    static bool isLazyDecoded(const SkBitmap&);
-
-    SkBitmap createLazyDecodedSkBitmap(PassOwnPtr<ImageDecoder>);
-    SkBitmap resizeLazyDecodedSkBitmap(const SkBitmap&, const SkISize& scaledSize, const SkIRect& scaledSubset);
-
-    void setData(const SkBitmap&, PassRefPtr<SharedBuffer>, bool allDataReceived);
-
-    // You may only lock one set of pixels at a time; overlapping lock calls are not allowed.
-    void* lockPixels(PassRefPtr<ImageFrameGenerator>, const SkISize& scaledSize, const SkIRect& scaledSubset);
-    void unlockPixels();
-
-    void frameGeneratorBeingDestroyed(ImageFrameGenerator*);
-
-private:
-    ImageDecodingStore();
-    bool calledOnValidThread() const;
-    void createFrameGenerator(PassOwnPtr<ImageDecoder>);
-    ScaledImageFragment* lookupFrameCache(int imageId, const SkISize& scaledSize) const;
-    void deleteFrameCache(int imageId);
-
-    Vector<OwnPtr<ScaledImageFragment> > m_frameCache;
-
-    SkBitmap m_lockedSkBitmap;
-};
-
-} // namespace WebCore
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.cpp b/Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.cpp
deleted file mode 100644 (file)
index 4c2f299..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "ImageFrameGenerator.h"
-
-#include "ImageDecoder.h"
-#include "ImageDecodingStore.h"
-#include "SharedBuffer.h"
-
-namespace {
-
-// An unique ID for an image file.
-int s_nextImageId = 0;
-
-} // namespace
-
-namespace WebCore {
-
-ImageFrameGenerator::ImageFrameGenerator(PassOwnPtr<ImageDecoder> decoder)
-    : m_decoder(decoder)
-{
-    m_fullSize = SkISize::Make(m_decoder->size().width(), m_decoder->size().height());
-    m_imageId = s_nextImageId++;
-}
-
-ImageFrameGenerator::~ImageFrameGenerator()
-{
-    if (ImageDecodingStore::instanceOnMainThread())
-        ImageDecodingStore::instanceOnMainThread()->frameGeneratorBeingDestroyed(this);
-}
-
-ImageDecoder* ImageFrameGenerator::decoder()
-{
-    return m_decoder.get();
-}
-
-void ImageFrameGenerator::setData(PassRefPtr<SharedBuffer> data, bool allDataReceived)
-{
-    m_data = data;
-    if (m_decoder)
-        m_decoder->setData(m_data.get(), allDataReceived);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.h b/Source/WebCore/platform/graphics/chromium/ImageFrameGenerator.h
deleted file mode 100644 (file)
index b9cd72b..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ImageFrameGenerator_h
-#define ImageFrameGenerator_h
-
-#include "SkSize.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class ImageDecoder;
-class SharedBuffer;
-
-class ImageFrameGenerator : public RefCounted<ImageFrameGenerator> {
-public:
-    static PassRefPtr<ImageFrameGenerator> create(PassOwnPtr<ImageDecoder> decoder)
-    {
-        return adoptRef(new ImageFrameGenerator(decoder));
-    }
-
-    explicit ImageFrameGenerator(PassOwnPtr<ImageDecoder>);
-    ~ImageFrameGenerator();
-
-    // Creates the image decoder if needed.
-    ImageDecoder* decoder();
-    void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
-
-    const SkISize& fullSize() const { return m_fullSize; }
-    int imageId() const { return m_imageId; }
-
-private:
-    OwnPtr<ImageDecoder> m_decoder;
-    RefPtr<SharedBuffer> m_data;
-    SkISize m_fullSize;
-    int m_imageId;
-};
-
-} // namespace WebCore
-
-#endif
diff --git a/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.cpp b/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.cpp
deleted file mode 100644 (file)
index 56dd091..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LazyDecodingPixelRef.h"
-
-#include "ImageDecoder.h"
-#include "ImageDecodingStore.h"
-#include "ImageFrameGenerator.h"
-#include <wtf/MainThread.h>
-
-namespace WebCore {
-
-LazyDecodingPixelRef::LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator> frameGenerator, const SkISize& scaledSize, const SkIRect& scaledSubset)
-    : SkPixelRef(0)
-    , m_frameGenerator(frameGenerator)
-    , m_scaledSize(scaledSize)
-    , m_scaledSubset(scaledSubset)
-{
-}
-
-LazyDecodingPixelRef::~LazyDecodingPixelRef()
-{
-}
-
-bool LazyDecodingPixelRef::isScaled(const SkISize& fullSize) const
-{
-    return fullSize != m_scaledSize;
-}
-
-bool LazyDecodingPixelRef::isClipped() const
-{
-    return m_scaledSize.width() != m_scaledSubset.width() || m_scaledSize.height() != m_scaledSubset.height();
-}
-
-void* LazyDecodingPixelRef::onLockPixels(SkColorTable**)
-{
-    ASSERT(isMainThread());
-    return ImageDecodingStore::instanceOnMainThread()->lockPixels(m_frameGenerator, m_scaledSize, m_scaledSubset);
-}
-
-void LazyDecodingPixelRef::onUnlockPixels()
-{
-    ASSERT(isMainThread());
-    ImageDecodingStore::instanceOnMainThread()->unlockPixels();
-}
-
-bool LazyDecodingPixelRef::onLockPixelsAreWritable() const
-{
-    return false;
-}
-
-} // namespace WebKit
diff --git a/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.h b/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.h
deleted file mode 100644 (file)
index 0ab9ccc..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LazyDecodingPixelRef_h
-#define LazyDecodingPixelRef_h
-
-#include "SkFlattenableBuffers.h"
-#include "SkPixelRef.h"
-#include "SkRect.h"
-#include "SkSize.h"
-
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-class ImageFrameGenerator;
-
-class LazyDecodingPixelRef : public SkPixelRef {
-public:
-    LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator>, const SkISize& scaledSize, const SkIRect& scaledSubset);
-    virtual ~LazyDecodingPixelRef();
-
-    SK_DECLARE_UNFLATTENABLE_OBJECT()
-
-    PassRefPtr<ImageFrameGenerator> frameGenerator() const { return m_frameGenerator; }
-    bool isScaled(const SkISize& fullSize) const;
-    bool isClipped() const;
-
-protected:
-    // SkPixelRef implementation.
-    virtual void* onLockPixels(SkColorTable**);
-    virtual void onUnlockPixels();
-    virtual bool onLockPixelsAreWritable() const;
-
-private:
-    RefPtr<ImageFrameGenerator> m_frameGenerator;
-    SkISize m_scaledSize;
-    SkIRect m_scaledSubset;
-};
-
-} // namespace WebCore
-
-#endif // LazyDecodingPixelRef_h_
diff --git a/Source/WebCore/platform/graphics/chromium/ScaledImageFragment.cpp b/Source/WebCore/platform/graphics/chromium/ScaledImageFragment.cpp
deleted file mode 100644 (file)
index 974e6ff..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "ScaledImageFragment.h"
-
-namespace WebCore {
-
-ScaledImageFragment::~ScaledImageFragment()
-{
-}
-
-ScaledImageFragment::ScaledImageFragment(int imageId, const SkISize& scaledSize, const SkBitmap& bitmap, const bool isComplete)
-    : m_imageId(imageId)
-    , m_scaledSize(scaledSize)
-    , m_bitmap(bitmap)
-    , m_isComplete(isComplete)
-{
-}
-
-bool ScaledImageFragment::isEqual(int imageId, const SkISize& scaledSize) const
-{
-    return imageId == m_imageId && scaledSize == m_scaledSize;
-}
-
-bool ScaledImageFragment::isEqual(int imageId) const
-{
-    return imageId == m_imageId;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/chromium/ScaledImageFragment.h b/Source/WebCore/platform/graphics/chromium/ScaledImageFragment.h
deleted file mode 100644 (file)
index 5b7ffc9..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScaledImageFragment_h
-#define ScaledImageFragment_h
-
-#include "SkBitmap.h"
-#include "SkRect.h"
-#include "SkSize.h"
-
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-// ScaledImageFragment is a scaled version of a image. It is identified
-// by two things:
-// 1. Image ID. The original image that this fragment comes from.
-// 2. Scaled image size.
-class ScaledImageFragment {
-public:
-    static PassOwnPtr<ScaledImageFragment> create(int imageId, const SkISize& scaledSize, const SkBitmap& bitmap, bool isComplete)
-    {
-        return adoptPtr(new ScaledImageFragment(imageId, scaledSize, bitmap, isComplete));
-    }
-
-    ScaledImageFragment(int imageId, const SkISize&, const SkBitmap&, bool isComplete);
-    ~ScaledImageFragment();
-
-    const SkBitmap& bitmap() const { return m_bitmap; }
-    SkBitmap& bitmap() { return m_bitmap; }
-
-    bool isEqual(int imageId, const SkISize& scaledSize) const;
-    bool isEqual(int imageId) const;
-    bool isComplete() const { return m_isComplete; }
-
-private:
-    int m_imageId;
-    SkISize m_scaledSize;
-    SkBitmap m_bitmap;
-    bool m_isComplete;
-};
-
-} // namespace WebCore
-
-#endif
index d084ec8f41cfaf464c8b64864ffd4056a743a259..1862a2afc6e3504936dcbc903ce6f24d4aaf50ad 100644 (file)
 #include "SkPixelRef.h"
 #include "SkiaUtils.h"
 
-#if PLATFORM(CHROMIUM)
-#include "ImageDecodingStore.h"
-#include "TraceEvent.h"
-#endif
-
 namespace WebCore {
 
 NativeImageSkia::NativeImageSkia()
@@ -78,11 +73,6 @@ bool NativeImageSkia::hasResizedBitmap(const SkISize& scaledImageSize, const SkI
 
 SkBitmap NativeImageSkia::resizedBitmap(const SkISize& scaledImageSize, const SkIRect& scaledImageSubset) const
 {
-#if PLATFORM(CHROMIUM)
-    if (ImageDecodingStore::isLazyDecoded(m_image))
-        return ImageDecodingStore::instanceOnMainThread()->resizeLazyDecodedSkBitmap(m_image, scaledImageSize, scaledImageSubset);
-#endif
-
     if (!hasResizedBitmap(scaledImageSize, scaledImageSubset)) {
         bool shouldCache = isDataComplete()
             && shouldCacheResampling(scaledImageSize, scaledImageSubset);
index 9f697a84ab09afbac3b62ae3fce566c4fb6d742d..fc82a5c25ad78e877dc99188e9fdb1e85b1ad27c 100644 (file)
@@ -148,18 +148,6 @@ namespace WebCore {
 
         void reportMemoryUsage(MemoryObjectInfo*) const;
 
-#if PLATFORM(CHROMIUM)
-        void setSkBitmap(const SkBitmap& bitmap)
-        {
-            m_bitmap = NativeImageSkia(bitmap, 1);
-        }
-
-        const SkBitmap& getSkBitmap() const
-        {
-            return m_bitmap.bitmap();
-        }
-#endif
-
     private:
         int width() const;
         int height() const;
index b1fe553cce67b7c2f065a4263da51cc492880cb6..228beef06bf55d1dcbeccd34a8bfed8e1fa090b8 100644 (file)
@@ -1,3 +1,23 @@
+2012-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r131810.
+        http://trac.webkit.org/changeset/131810
+        https://bugs.webkit.org/show_bug.cgi?id=99762
+
+        Broke linux debug webkit_unit_tests (Requested by
+        danakj|gardening on #webkit).
+
+        * WebKit.gypi:
+        * public/WebSettings.h:
+        * src/WebKit.cpp:
+        (WebKit::shutdown):
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::WebSettingsImpl):
+        * src/WebSettingsImpl.h:
+        (WebSettingsImpl):
+        * tests/DeferredImageDecoderTest.cpp: Removed.
+        * tests/MockImageDecoder.h: Removed.
+
 2012-10-18  Alpha Lam  <hclam@chromium.org>
 
         [chromium] Implement deferred image decoding
index 64063a021c46714d9d59856acec422ef87bde99e..24cae298ff50491fec13fab43bd9086966786c0f 100644 (file)
@@ -61,7 +61,6 @@
             'tests/CompositorFakeWebGraphicsContext3D.h',
             'tests/DateTimeFormatTest.cpp',
             'tests/DecimalTest.cpp',
-            'tests/DeferredImageDecoderTest.cpp',
             'tests/DragImageTest.cpp',
             'tests/EventListenerTest.cpp',
             'tests/FakeWebCompositorOutputSurface.h',
@@ -79,9 +78,8 @@
             'tests/IDBLevelDBCodingTest.cpp',
             'tests/IDBRequestTest.cpp',
             'tests/ImageLayerChromiumTest.cpp',
-            'tests/MockImageDecoder.h',
-            'tests/KeyboardTest.cpp',
             'tests/KURLTest.cpp',
+            'tests/KeyboardTest.cpp',
             'tests/LevelDBTest.cpp',
             'tests/LinkHighlightTest.cpp',
             'tests/ListenerLeakTest.cpp',
index 08cd19745cc70aae379c8951e64a14827f6a4545..abd84ed0e57afe9831fffd06391e4291e5dc2be4 100644 (file)
@@ -86,7 +86,6 @@ public:
     virtual void setDefaultTextEncodingName(const WebString&) = 0;
     virtual void setDefaultTileSize(WebSize) = 0;
     virtual void setDeferred2dCanvasEnabled(bool) = 0;
-    virtual void setDeferredImageDecodingEnabled(bool) = 0;
     virtual void setDeveloperExtrasEnabled(bool) = 0;
     virtual void setDeviceSupportsMouse(bool) = 0;
     virtual void setDeviceSupportsTouch(bool) = 0;
index 243d08e62948056979362dfcf858c6ff85e8a768..e357f28e4283a700156d6cfabd50edb3ed2f7897 100644 (file)
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "WebKit.h"
 
-#include "ImageDecodingStore.h"
 #include "LayoutTestSupport.h"
 #include "Logging.h"
 #include "MutationObserver.h"
@@ -166,7 +165,6 @@ void shutdown()
     }
 #endif
     s_webKitPlatformSupport = 0;
-    WebCore::ImageDecodingStore::shutdown();
     Platform::shutdown();
     WebPrerenderingSupport::shutdown();
 }
index dc7736d9a21b09074cfb1d9159cb8f7b19c90980..988c5e66b1e13c16e9f67d02a47ca078df386098 100644 (file)
@@ -32,7 +32,6 @@
 #include "WebSettingsImpl.h"
 
 #include "FontRenderingMode.h"
-#include "ImageDecodingStore.h"
 #include "Settings.h"
 #include <public/WebString.h>
 #include <public/WebURL.h>
@@ -56,7 +55,6 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings)
     , m_applyDefaultDeviceScaleFactorInCompositor(false)
     , m_gestureTapHighlightEnabled(true)
     , m_autoZoomFocusedNodeToLegibleScale(false)
-    , m_deferredImageDecodingEnabled(false)
     , m_defaultTileSize(WebSize(256, 256))
     , m_maxUntiledLayerSize(WebSize(512, 512))
 {
@@ -482,15 +480,6 @@ void WebSettingsImpl::setDeferred2dCanvasEnabled(bool enabled)
     m_settings->setDeferred2dCanvasEnabled(enabled);
 }
 
-void WebSettingsImpl::setDeferredImageDecodingEnabled(bool enabled)
-{
-    if (!m_deferredImageDecodingEnabled && enabled)
-        ImageDecodingStore::initializeOnMainThread();
-    if (m_deferredImageDecodingEnabled && !enabled)
-        ImageDecodingStore::shutdown();
-    m_deferredImageDecodingEnabled = enabled;
-}
-
 void WebSettingsImpl::setAcceleratedCompositingForFixedPositionEnabled(bool enabled)
 {
     m_settings->setAcceleratedCompositingForFixedPositionEnabled(enabled);
index 9051bab617f86bfe049b0b77e6e2adf02d72d658..1169c31cf3eb2ae80fda1f885cd0869168f46a41 100644 (file)
@@ -78,7 +78,6 @@ public:
     virtual void setDefaultTextEncodingName(const WebString&);
     virtual void setDefaultTileSize(WebSize);
     virtual void setDeferred2dCanvasEnabled(bool);
-    virtual void setDeferredImageDecodingEnabled(bool);
     virtual void setDeveloperExtrasEnabled(bool);
     virtual void setDeviceSupportsMouse(bool);
     virtual void setDeviceSupportsTouch(bool);
@@ -179,7 +178,6 @@ private:
     bool m_applyDefaultDeviceScaleFactorInCompositor;
     bool m_gestureTapHighlightEnabled;
     bool m_autoZoomFocusedNodeToLegibleScale;
-    bool m_deferredImageDecodingEnabled;
     WebSize m_defaultTileSize;
     WebSize m_maxUntiledLayerSize;
 };
diff --git a/Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp b/Source/WebKit/chromium/tests/DeferredImageDecoderTest.cpp
deleted file mode 100644 (file)
index 4825498..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "DeferredImageDecoder.h"
-
-#include "ImageDecodingStore.h"
-#include "MockImageDecoder.h"
-#include "NativeImageSkia.h"
-#include "SkCanvas.h"
-#include "SkDevice.h"
-#include "SkPicture.h"
-#include <gtest/gtest.h>
-
-using namespace WebCore;
-
-namespace {
-
-class DeferredImageDecoderTest : public ::testing::Test {
-public:
-    virtual void SetUp()
-    {
-        ImageDecodingStore::initializeOnMainThread();
-        m_actualDecoder = new MockImageDecoder();
-        m_actualDecoder->setSize(600, 613);
-        m_lazyDecoder = DeferredImageDecoder::createForTesting(adoptPtr(m_actualDecoder));
-        m_canvas.setDevice(new SkDevice(SkBitmap::kARGB_8888_Config, 100, 100))->unref();
-    }
-
-    virtual void TearDown()
-    {
-        ImageDecodingStore::shutdown();
-    }
-
-protected:
-    // Don't own this but saves the pointer to query states.
-    MockImageDecoder* m_actualDecoder;
-    OwnPtr<DeferredImageDecoder> m_lazyDecoder;
-    SkPicture m_picture;
-    SkCanvas m_canvas;
-};
-
-TEST_F(DeferredImageDecoderTest, drawIntoSkPicture)
-{
-    OwnPtr<NativeImageSkia> image(adoptPtr(m_lazyDecoder->frameBufferAtIndex(0)->asNewNativeImage()));
-    EXPECT_EQ(m_actualDecoder->size().width(), image->bitmap().width());
-    EXPECT_EQ(m_actualDecoder->size().height(), image->bitmap().height());
-    EXPECT_FALSE(image->bitmap().isNull());
-    EXPECT_TRUE(image->bitmap().isImmutable());
-
-    SkCanvas* tempCanvas = m_picture.beginRecording(100, 100);
-    tempCanvas->drawBitmap(image->bitmap(), 0, 0);
-    m_picture.endRecording();
-    EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
-
-    m_canvas.drawPicture(m_picture);
-    EXPECT_EQ(1, m_actualDecoder->frameBufferRequestCount());
-}
-
-TEST_F(DeferredImageDecoderTest, drawScaledIntoSkPicture)
-{
-    OwnPtr<NativeImageSkia> image(adoptPtr(m_lazyDecoder->frameBufferAtIndex(0)->asNewNativeImage()));
-    SkBitmap scaledBitmap = image->resizedBitmap(SkISize::Make(50, 51), SkIRect::MakeWH(50, 51));
-    EXPECT_FALSE(scaledBitmap.isNull());
-    EXPECT_TRUE(scaledBitmap.isImmutable());
-    EXPECT_EQ(50, scaledBitmap.width());
-    EXPECT_EQ(51, scaledBitmap.height());
-    EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
-
-    SkCanvas* tempCanvas = m_picture.beginRecording(100, 100);
-    tempCanvas->drawBitmap(scaledBitmap, 0, 0);
-    m_picture.endRecording();
-    EXPECT_EQ(0, m_actualDecoder->frameBufferRequestCount());
-
-    m_canvas.drawPicture(m_picture);
-    EXPECT_EQ(1, m_actualDecoder->frameBufferRequestCount());
-}
-
-} // namespace
diff --git a/Source/WebKit/chromium/tests/MockImageDecoder.h b/Source/WebKit/chromium/tests/MockImageDecoder.h
deleted file mode 100644 (file)
index 5cf2374..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MockImageDecoder_h
-
-#include "ImageDecoder.h"
-
-namespace WebCore {
-
-class MockImageDecoder : public ImageDecoder {
-public:
-    MockImageDecoder()
-        : ImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied)
-        , m_frameBufferRequestCount(0)
-    { }
-
-    virtual String filenameExtension() const
-    {
-        return "mock";
-    }
-
-    virtual ImageFrame* frameBufferAtIndex(size_t)
-    {
-        ++m_frameBufferRequestCount;
-
-        m_frameBufferCache.resize(1);
-        m_frameBufferCache[0].setSize(size().width(), size().height());
-        return &m_frameBufferCache[0];
-    }
-
-    int frameBufferRequestCount() const { return m_frameBufferRequestCount; }
-
-private:
-    int m_frameBufferRequestCount;
-};
-
-} // namespace WebCore
-
-#endif // MockImageDecoder_h
index 7823bddcd530159ac92835fdc4e1b7d0998d0fd6..1c7917170f3806d1642149e64d4de4b121690a0d 100644 (file)
@@ -1,3 +1,27 @@
+2012-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r131810.
+        http://trac.webkit.org/changeset/131810
+        https://bugs.webkit.org/show_bug.cgi?id=99762
+
+        Broke linux debug webkit_unit_tests (Requested by
+        danakj|gardening on #webkit).
+
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        (main):
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell):
+        (TestShell::resetWebSettings):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell):
+        * DumpRenderTree/chromium/WebPreferences.cpp:
+        (WebPreferences::reset):
+        (WebPreferences::applyTo):
+        * DumpRenderTree/chromium/WebPreferences.h:
+        (WebPreferences):
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        (ChromiumPort.virtual_test_suites):
+
 2012-10-18  Alpha Lam  <hclam@chromium.org>
 
         [chromium] Implement deferred image decoding
index 5a32104496f79b1f2a4548b3653456b4061fa6b5..30ce28851fc9a9a46b8b63e6dbd00da1c3fea838 100644 (file)
@@ -64,7 +64,6 @@ static const char optionEnableAcceleratedPainting[] = "--enable-accelerated-pain
 static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
 static const char optionUseGraphicsContext3DImplementation[] = "--use-graphics-context-3d-implementation=";
 static const char optionEnablePerTilePainting[] = "--enable-per-tile-painting";
-static const char optionEnableDeferredImageDecoding[] = "--enable-deferred-image-decoding";
 
 static const char optionStressOpt[] = "--stress-opt";
 static const char optionStressDeopt[] = "--stress-deopt";
@@ -134,7 +133,6 @@ int main(int argc, char* argv[])
     bool deferred2DCanvasEnabled = false;
     bool acceleratedPaintingEnabled = false;
     bool perTilePaintingEnabled = false;
-    bool deferredImageDecodingEnabled = false;
     bool stressOpt = false;
     bool stressDeopt = false;
     bool hardwareAcceleratedGL = false;
@@ -185,8 +183,6 @@ int main(int argc, char* argv[])
               fprintf(stderr, "Unknown GraphicContext3D implementation %s\n", implementation.c_str());
         } else if (argument == optionEnablePerTilePainting)
             perTilePaintingEnabled = true;
-        else if (argument == optionEnableDeferredImageDecoding)
-            deferredImageDecodingEnabled = true;
         else if (argument == optionStressOpt)
             stressOpt = true;
         else if (argument == optionStressDeopt)
@@ -226,7 +222,6 @@ int main(int argc, char* argv[])
         shell.setDeferred2dCanvasEnabled(deferred2DCanvasEnabled);
         shell.setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
         shell.setPerTilePaintingEnabled(perTilePaintingEnabled);
-        shell.setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
         shell.setJavaScriptFlags(javaScriptFlags);
         shell.setStressOpt(stressOpt);
         shell.setStressDeopt(stressDeopt);
index ac7759681a046d03d4718fc458c27e82e1461799..32585faa1b2d8ad81a83b15e8f712bd8ca72489b 100644 (file)
@@ -114,7 +114,6 @@ TestShell::TestShell()
     , m_accelerated2dCanvasEnabled(false)
     , m_deferred2dCanvasEnabled(false)
     , m_acceleratedPaintingEnabled(false)
-    , m_deferredImageDecodingEnabled(false)
     , m_stressOpt(false)
     , m_stressDeopt(false)
     , m_dumpWhenFinished(true)
@@ -230,7 +229,6 @@ void TestShell::resetWebSettings(WebView& webView)
     m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
     m_prefs.deferred2dCanvasEnabled = m_deferred2dCanvasEnabled;
     m_prefs.acceleratedPaintingEnabled = m_acceleratedPaintingEnabled;
-    m_prefs.deferredImageDecodingEnabled = m_deferredImageDecodingEnabled;
     m_prefs.applyTo(&webView);
 }
 
index 3926624469b68ccbc874b491ea483a0b6392ce55..44b5ae388c68d65de890fc800fed5229eec2a324 100644 (file)
@@ -138,7 +138,6 @@ public:
     void setDeferred2dCanvasEnabled(bool enabled) { m_deferred2dCanvasEnabled = enabled; }
     void setAcceleratedPaintingEnabled(bool enabled) { m_acceleratedPaintingEnabled = enabled; }
     void setPerTilePaintingEnabled(bool);
-    void setDeferredImageDecodingEnabled(bool enabled) { m_deferredImageDecodingEnabled = enabled; }
 #if defined(OS_WIN)
     // Access to the finished event. Used by the static WatchDog thread.
     HANDLE finishedEvent() { return m_finishedEvent; }
@@ -236,7 +235,6 @@ private:
     bool m_deferred2dCanvasEnabled;
     bool m_acceleratedPaintingEnabled;
     bool m_perTilePaintingEnabled;
-    bool m_deferredImageDecodingEnabled;
     WebPreferences m_prefs;
     bool m_stressOpt;
     bool m_stressDeopt;
index 5c8c92c99942644dd19a49c98e66c1a4f06d444d..3bc2cdd9f2ae4170c33ad64106d4a7f2d09021f5 100644 (file)
@@ -116,7 +116,6 @@ void WebPreferences::reset()
     deferred2dCanvasEnabled = false;
     acceleratedPaintingEnabled = false;
     forceCompositingMode = false;
-    deferredImageDecodingEnabled = false;
     mediaPlaybackRequiresUserGesture = false;
     mockScrollbarsEnabled = false;
     cssCustomFilterEnabled = false;
@@ -225,7 +224,6 @@ void WebPreferences::applyTo(WebView* webView)
     settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
     settings->setDeferred2dCanvasEnabled(deferred2dCanvasEnabled);
     settings->setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
-    settings->setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
     settings->setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture);
     settings->setMockScrollbarsEnabled(mockScrollbarsEnabled);
     settings->setApplyDefaultDeviceScaleFactorInCompositor(forceCompositingMode);
index e0315f2d07c1e5b9855fe7b3aa2e14cf7e1e40bf..c36553b3546964c76f29916a9ea9b9e2a23e24b2 100644 (file)
@@ -109,7 +109,6 @@ struct WebPreferences {
     bool accelerated2dCanvasEnabled;
     bool deferred2dCanvasEnabled;
     bool acceleratedPaintingEnabled;
-    bool deferredImageDecodingEnabled;
     bool mediaPlaybackRequiresUserGesture;
     bool mockScrollbarsEnabled;
     bool cssCustomFilterEnabled;
index a69f5a822aa3fe32846f91701164193cc2238f52..c310eb15b1954ddeddc333b980f665d5fcdb91ce 100755 (executable)
@@ -390,9 +390,6 @@ class ChromiumPort(Port):
             VirtualTestSuite('platform/chromium/virtual/softwarecompositing',
                              'compositing',
                              ['--enable-software-compositing']),
-            VirtualTestSuite('platform/chromium/virtual/deferred/fast/images',
-                             'fast/images',
-                             ['--enable-deferred-image-decoding', '--enable-per-tile-painting', '--force-compositing-mode']),
         ]
 
     #