[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
senorblanco at chromium.org
senorblanco at chromium.org
Wed Dec 22 12:14:42 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 413b6e2ba936e0c04bcab702a1a257138dfe1301
Author: senorblanco at chromium.org <senorblanco at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 17 19:51:11 2010 +0000
2010-08-17 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r65528.
http://trac.webkit.org/changeset/65528
https://bugs.webkit.org/show_bug.cgi?id=44123
"Broke a bunch of canvas tests on Chrome win/linux."
(Requested by senorblanco on #webkit).
* platform/graphics/skia/BitmapImageSingleFrameSkia.h:
(WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::drawsUsingCopy):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImageSingleFrameSkia::create):
* platform/graphics/skia/NativeImageSkia.cpp:
* platform/graphics/skia/NativeImageSkia.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2481b9f..83126b1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-17 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r65528.
+ http://trac.webkit.org/changeset/65528
+ https://bugs.webkit.org/show_bug.cgi?id=44123
+
+ "Broke a bunch of canvas tests on Chrome win/linux."
+ (Requested by senorblanco on #webkit).
+
+ * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
+ (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::ImageBuffer::drawsUsingCopy):
+ (WebCore::ImageBuffer::copyImage):
+ (WebCore::ImageBuffer::draw):
+ (WebCore::ImageBuffer::drawPattern):
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::BitmapImageSingleFrameSkia::create):
+ * platform/graphics/skia/NativeImageSkia.cpp:
+ * platform/graphics/skia/NativeImageSkia.h:
+
2010-08-17 Martin Robinson <mrobinson at igalia.com>
Reviewed by David Hyatt.
diff --git a/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h b/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h
index 553f203..9fb6a8b 100644
--- a/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h
+++ b/WebCore/platform/graphics/skia/BitmapImageSingleFrameSkia.h
@@ -46,10 +46,9 @@ namespace WebCore {
// is that NativeImagePtr = NativeImageSkia, yet callers have SkBitmap.
class BitmapImageSingleFrameSkia : public Image {
public:
- // Creates a new Image from the given SkBitmap. If "copyPixels" is true, a
- // deep copy is done. Otherwise, a shallow copy is done (pixel data is
- // ref'ed).
- static PassRefPtr<BitmapImageSingleFrameSkia> create(const SkBitmap&, bool copyPixels);
+ // Creates a new Image, by copying the pixel values out of |bitmap|.
+ // If creation failed, returns null.
+ static PassRefPtr<BitmapImageSingleFrameSkia> create(const SkBitmap&);
virtual bool isBitmapImage() const { return true; }
@@ -78,8 +77,8 @@ protected:
private:
NativeImageSkia m_nativeImage;
- // Creates a new Image from the given SkBitmap, using a shallow copy.
- explicit BitmapImageSingleFrameSkia(const SkBitmap&);
+ // Use create().
+ BitmapImageSingleFrameSkia() { }
};
} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index 1d3d5cb..a63eec5 100644
--- a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -89,13 +89,12 @@ GraphicsContext* ImageBuffer::context() const
bool ImageBuffer::drawsUsingCopy() const
{
- return false;
+ return true;
}
PassRefPtr<Image> ImageBuffer::copyImage() const
{
- ASSERT_NOT_REACHED();
- return 0;
+ return BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap());
}
void ImageBuffer::clip(GraphicsContext* context, const FloatRect& rect) const
@@ -108,15 +107,15 @@ void ImageBuffer::clip(GraphicsContext* context, const FloatRect& rect) const
void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
CompositeOperator op, bool useLowQualityScale)
{
- RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), context == m_context);
- context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
+ RefPtr<Image> imageCopy = copyImage();
+ context->drawImage(imageCopy.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
}
void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
{
- RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), context == m_context);
- image->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
+ RefPtr<Image> imageCopy = copyImage();
+ imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
void ImageBuffer::platformTransformColorSpace(const Vector<int>& lookUpTable)
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 6bbad5e..b514b1a 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -516,19 +516,11 @@ void BitmapImageSingleFrameSkia::draw(GraphicsContext* ctxt,
WebCoreCompositeToSkiaComposite(compositeOp));
}
-BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia(const SkBitmap& bitmap)
- : m_nativeImage(bitmap)
+PassRefPtr<BitmapImageSingleFrameSkia> BitmapImageSingleFrameSkia::create(const SkBitmap& bitmap)
{
-}
-
-PassRefPtr<BitmapImageSingleFrameSkia> BitmapImageSingleFrameSkia::create(const SkBitmap& bitmap, bool copyPixels)
-{
- if (copyPixels) {
- SkBitmap temp;
- bitmap.copyTo(&temp, bitmap.config());
- return adoptRef(new BitmapImageSingleFrameSkia(temp));
- }
- return adoptRef(new BitmapImageSingleFrameSkia(bitmap));
+ RefPtr<BitmapImageSingleFrameSkia> image(adoptRef(new BitmapImageSingleFrameSkia()));
+ bitmap.copyTo(&image->m_nativeImage, bitmap.config());
+ return image.release();
}
} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/NativeImageSkia.cpp b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
index 9effa5c..0c62c16 100644
--- a/WebCore/platform/graphics/skia/NativeImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
@@ -44,14 +44,6 @@ NativeImageSkia::NativeImageSkia()
{
}
-NativeImageSkia::NativeImageSkia(const SkBitmap& other)
- : SkBitmap(other),
- m_isDataComplete(false),
- m_lastRequestSize(0, 0),
- m_resizeRequests(0)
-{
-}
-
int NativeImageSkia::decodedSize() const
{
return getSize() + m_resizedImage.getSize();
diff --git a/WebCore/platform/graphics/skia/NativeImageSkia.h b/WebCore/platform/graphics/skia/NativeImageSkia.h
index e26a5ea..0718836 100644
--- a/WebCore/platform/graphics/skia/NativeImageSkia.h
+++ b/WebCore/platform/graphics/skia/NativeImageSkia.h
@@ -43,11 +43,6 @@ class NativeImageSkia : public SkBitmap {
public:
NativeImageSkia();
- // This constructor does a shallow copy of the passed-in SkBitmap (ie., it
- // references the same pixel data and bumps the refcount). Use only when
- // you want sharing semantics.
- explicit NativeImageSkia(const SkBitmap&);
-
// Returns the number of bytes of image data. This includes the cached
// resized version if there is one.
int decodedSize() const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list