[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 18:35:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 60a63406ed1c8843ced2ea4de259becce677f7d7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 14 04:47:34 2010 +0000
2010-12-13 Noel Gordon <noel.gordon at gmail.com>
Reviewed by David Levin.
[chromium] Upstream skia/ImageBuffer.cpp routine mulDiv255Ceil()
https://bugs.webkit.org/show_bug.cgi?id=50545
Skia has rolled, replace uses of mulDiv255Ceil with SkMulDiv255Ceiling.
No new tests, no change in behaviour.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::putImageData):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fbbb0a..9f13306 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-13 Noel Gordon <noel.gordon at gmail.com>
+
+ Reviewed by David Levin.
+
+ [chromium] Upstream skia/ImageBuffer.cpp routine mulDiv255Ceil()
+ https://bugs.webkit.org/show_bug.cgi?id=50545
+
+ Skia has rolled, replace uses of mulDiv255Ceil with SkMulDiv255Ceiling.
+
+ No new tests, no change in behaviour.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::putImageData):
+
2010-12-13 Gavin Peters <gavinp at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index 3c3ae86..468ccda 100644
--- a/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -246,14 +246,6 @@ PassRefPtr<ImageData> ImageBuffer::getPremultipliedImageData(const IntRect& rect
return getImageData<Premultiplied>(rect, *context()->platformContext()->bitmap(), m_size);
}
-// This function does the equivalent of (a * b + 254) / 255, without an integer divide.
-// Valid for a, b in the range [0..255].
-unsigned mulDiv255Ceil(unsigned a, unsigned b)
-{
- unsigned value = a * b + 255;
- return (value + (value >> 8)) >> 8;
-}
-
template <Multiply multiplied>
void putImageData(ImageData*& source, const IntRect& sourceRect, const IntPoint& destPoint,
const SkBitmap& bitmap, const IntSize& size)
@@ -297,9 +289,9 @@ void putImageData(ImageData*& source, const IntRect& sourceRect, const IntPoint&
const unsigned char* srcPixel = &srcRow[x * 4];
if (multiplied == Unmultiplied) {
unsigned char alpha = srcPixel[3];
- unsigned char r = mulDiv255Ceil(srcPixel[0], alpha);
- unsigned char g = mulDiv255Ceil(srcPixel[1], alpha);
- unsigned char b = mulDiv255Ceil(srcPixel[2], alpha);
+ unsigned char r = SkMulDiv255Ceiling(srcPixel[0], alpha);
+ unsigned char g = SkMulDiv255Ceiling(srcPixel[1], alpha);
+ unsigned char b = SkMulDiv255Ceiling(srcPixel[2], alpha);
destRow[x] = SkPackARGB32(alpha, r, g, b);
} else
destRow[x] = SkPackARGB32(srcPixel[3], srcPixel[0],
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list