[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

paroga at webkit.org paroga at webkit.org
Fri Jan 21 14:51:21 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit 3f99da80c0f5b55785398936f7c0a541e92caf6a
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jan 2 23:38:10 2011 +0000

    2011-01-02  Patrick Gansterer  <paroga at webkit.org>
    
            Unreviewed WinCE build fix for r74868.
    
            * platform/graphics/wince/ImageBufferWinCE.cpp:
            (WebCore::getImageData):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74879 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dbd2480..92dcea7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-02  Patrick Gansterer  <paroga at webkit.org>
+
+        Unreviewed WinCE build fix for r74868.
+
+        * platform/graphics/wince/ImageBufferWinCE.cpp:
+        (WebCore::getImageData):
+
 2011-01-02  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r74847.
diff --git a/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp b/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
index 2059011..537d27d 100644
--- a/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
+++ b/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
@@ -122,10 +122,10 @@ void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect
     imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
 }
 
-template <bool premultiplied> PassRefPtr<ByteArray>
-static getImageData(const IntRect& rect, const SharedBitmap* bitmap)
+template <bool premultiplied>
+static PassRefPtr<ByteArray> getImageData(const IntRect& rect, const SharedBitmap* bitmap)
 {
-    RefPtr<ImageData> imageData = ImageData::create(rect.width(), rect.height());
+    RefPtr<ByteArray> imageData = ByteArray::create(rect.width() * rect.height() * 4);
 
     const unsigned char* src = static_cast<const unsigned char*>(bitmap->bytes());
     if (!src)
@@ -137,13 +137,13 @@ static getImageData(const IntRect& rect, const SharedBitmap* bitmap)
         return imageData.release();
 
     unsigned char* dst = imageData->data();
-    memset(dst, 0, imageData->data()->data()->length());
+    memset(dst, 0, imageData->length());
     src += (sourceRect.y() * bitmap->width() + sourceRect.x()) * 4;
-    dst += ((sourceRect.y() - rect.y()) * imageData->width() + sourceRect.x() - rect.x()) * 4;
+    dst += ((sourceRect.y() - rect.y()) * rect.width() + sourceRect.x() - rect.x()) * 4;
     int bytesToCopy = sourceRect.width() * 4;
     int srcSkip = (bitmap->width() - sourceRect.width()) * 4;
-    int dstSkip = (imageData->width() - sourceRect.width()) * 4;
-    const unsigned char* dstEnd = dst + sourceRect.height() * imageData->width() * 4;
+    int dstSkip = (rect.width() - sourceRect.width()) * 4;
+    const unsigned char* dstEnd = dst + sourceRect.height() * rect.width() * 4;
     while (dst < dstEnd) {
         const unsigned char* dstRowEnd = dst + bytesToCopy;
         while (dst < dstRowEnd) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list