[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
pkasting at chromium.org
pkasting at chromium.org
Thu Oct 29 20:32:37 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 9e40bb05a4fcb51c28718219eaa890f2d15f066e
Author: pkasting at chromium.org <pkasting at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 23 21:18:57 2009 +0000
https://bugs.webkit.org/show_bug.cgi?id=29694
[Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
Reviewed by Dimitri Glazkov.
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::drawResampledBitmap):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2c6ef3e..f67b81e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-23 Peter Kasting <pkasting at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29694
+ [Chromium] Eliminate dependency on gfx::Rect from ImageSkia.
+
+ * platform/graphics/skia/ImageSkia.cpp:
+ (WebCore::drawResampledBitmap):
+
2009-09-22 Timothy Hatcher <timothy at apple.com>
Prevent scrolling multiple elements during latched wheel events.
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 45c3dcd..ecab364 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -41,6 +41,7 @@
#include "PlatformContextSkia.h"
#include "PlatformString.h"
#include "SkiaUtils.h"
+#include "SkRect.h"
#include "SkShader.h"
#include "TransformationMatrix.h"
@@ -158,8 +159,8 @@ static void drawResampledBitmap(SkCanvas& canvas, SkPaint& paint, const NativeIm
// We will always draw in integer sizes, so round the destination rect.
SkIRect destRectRounded;
destRect.round(&destRectRounded);
- SkIRect resizedImageRect; // Represents the size of the resized image.
- resizedImageRect.set(0, 0, destRectRounded.width(), destRectRounded.height());
+ SkIRect resizedImageRect = // Represents the size of the resized image.
+ { 0, 0, destRectRounded.width(), destRectRounded.height() };
if (srcIsFull && bitmap.hasResizedBitmap(destRectRounded.width(), destRectRounded.height())) {
// Yay, this bitmap frame already has a resized version.
@@ -196,25 +197,19 @@ static void drawResampledBitmap(SkCanvas& canvas, SkPaint& paint, const NativeIm
} else {
// We should only resize the exposed part of the bitmap to do the
// minimal possible work.
- gfx::Rect destBitmapSubset(destBitmapSubsetSkI.fLeft,
- destBitmapSubsetSkI.fTop,
- destBitmapSubsetSkI.width(),
- destBitmapSubsetSkI.height());
// Resample the needed part of the image.
SkBitmap resampled = skia::ImageOperations::Resize(subset,
skia::ImageOperations::RESIZE_LANCZOS3,
destRectRounded.width(), destRectRounded.height(),
- destBitmapSubset);
+ destBitmapSubsetSkI);
// Compute where the new bitmap should be drawn. Since our new bitmap
// may be smaller than the original, we have to shift it over by the
// same amount that we cut off the top and left.
- SkRect offsetDestRect = {
- destBitmapSubset.x() + destRect.fLeft,
- destBitmapSubset.y() + destRect.fTop,
- destBitmapSubset.right() + destRect.fLeft,
- destBitmapSubset.bottom() + destRect.fTop };
+ destBitmapSubsetSkI.offset(destRect.fLeft, destRect.fTop);
+ SkRect offsetDestRect;
+ offsetDestRect.set(destBitmapSubsetSkI);
canvas.drawBitmapRect(resampled, 0, offsetDestRect, &paint);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list