[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
commit-queue at webkit.org
commit-queue at webkit.org
Mon Dec 27 16:31:05 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3299b8d50fcbe6a2e2e761f9507e729145d16001
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 22:03:24 2010 +0000
2010-12-22 W. James MacLean <wjmaclean at chromium.org>
Reviewed by Kenneth Russell.
[chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
https://bugs.webkit.org/show_bug.cgi?id=51186
No new tests. Behaviour not changed, but need the asserts to detect when assumptions violated.
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::updateContentsIfDirty):
* platform/graphics/skia/GraphicsContext3DSkia.cpp:
(WebCore::GraphicsContext3D::getImageData):
2010-12-22 W. James MacLean <wjmaclean at chromium.org>
Reviewed by Kenneth Russell.
[chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
https://bugs.webkit.org/show_bug.cgi?id=51186
Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b033207..b345d03 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-22 W. James MacLean <wjmaclean at chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+ https://bugs.webkit.org/show_bug.cgi?id=51186
+
+ No new tests. Behaviour not changed, but need the asserts to detect when assumptions violated.
+
+ * platform/graphics/chromium/ImageLayerChromium.cpp:
+ (WebCore::ImageLayerChromium::updateContentsIfDirty):
+ * platform/graphics/skia/GraphicsContext3DSkia.cpp:
+ (WebCore::GraphicsContext3D::getImageData):
+
2010-12-22 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
index cd299c1..5b42826 100644
--- a/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
@@ -156,8 +156,13 @@ void ImageLayerChromium::updateContentsIfDirty()
#error "Need to implement for your platform."
#endif
- if (pixels)
+ if (pixels) {
+ // Since this operation requires contiguous pixels, make sure there's no padding at the
+ // end of each line.
+ ASSERT(skiaBitmap->rowBytes() == SkBitmap::ComputeRowBytes(skiaConfig, skiaBitmap->width()));
+
updateTextureRect(pixels, bitmapSize, dirtyRect);
+ }
}
}
diff --git a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
index 8b7ac86..7fd7c70 100644
--- a/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContext3DSkia.cpp
@@ -78,7 +78,8 @@ bool GraphicsContext3D::getImageData(Image* image,
return false;
SkBitmap& skiaImageRef = *skiaImage;
SkAutoLockPixels lock(skiaImageRef);
- ASSERT(skiaImage->rowBytes() == skiaImage->width() * 4);
+ ASSERT(skiaImage->bytesPerPixel() == 4
+ && skiaImage->rowBytes() == SkBitmap::ComputeRowBytes(skiaImage->config(), skiaImage->width()));
outputVector.resize(skiaImage->rowBytes() * skiaImage->height());
return packPixels(reinterpret_cast<const uint8_t*>(skiaImage->getPixels()),
SourceFormatBGRA8, skiaImage->width(), skiaImage->height(), 0,
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index ffc8b90..132ca55 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-22 W. James MacLean <wjmaclean at chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+ https://bugs.webkit.org/show_bug.cgi?id=51186
+
+ Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
2010-12-21 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index 2dff52b..6a0c672 100644
--- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -172,9 +172,13 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap();
const SkBitmap* readbackBitmap = 0;
ASSERT(canvasBitmap->config() == SkBitmap::kARGB_8888_Config);
+ ASSERT(SkBitmap::ComputeBytesPerPixel(canvasBitmap->config()) == 4);
if (canvasBitmap->width() == m_impl->width() && canvasBitmap->height() == m_impl->height()) {
// This is the fastest and most common case. We read back
// directly into the canvas's backing store.
+ // Make sure no extra padding at line ends (e.g. a bitmap extracted subset).
+ ASSERT(readbackBitmap->rowBytes() ==
+ SkBitmap::ComputeRowBytes(readbackBitmap->config(), readbackBitmap->width()));
readbackBitmap = canvasBitmap;
m_resizingBitmap.reset();
} else {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list