[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
inferno at chromium.org
inferno at chromium.org
Wed Dec 22 18:21:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ad91daf59993af1ca13fdd2c9768a04058e2a5d1
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 10 03:56:31 2010 +0000
2010-12-09 Vincent Scheib <scheib at chromium.org>
Reviewed by James Robinson.
Clip update rectangle for Texture::updateSubRect to texture size
https://bugs.webkit.org/show_bug.cgi?id=49929
Test: fast/canvas/canvas-largedraws.html
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
2010-12-09 Vincent Scheib <scheib at chromium.org>
Reviewed by James Robinson.
Clip update rectangle for Texture::updateSubRect to texture size
https://bugs.webkit.org/show_bug.cgi?id=49929
* fast/canvas/canvas-largedraws-expected.txt: Added.
* fast/canvas/canvas-largedraws.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7733412..b47b086 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-09 Vincent Scheib <scheib at chromium.org>
+
+ Reviewed by James Robinson.
+
+ Clip update rectangle for Texture::updateSubRect to texture size
+ https://bugs.webkit.org/show_bug.cgi?id=49929
+
+ * fast/canvas/canvas-largedraws-expected.txt: Added.
+ * fast/canvas/canvas-largedraws.html: Added.
+
2010-12-09 Mihai Parparita <mihaip at chromium.org>
Unreviewed Chromium test expectations update.
diff --git a/LayoutTests/fast/canvas/canvas-largedraws-expected.txt b/LayoutTests/fast/canvas/canvas-largedraws-expected.txt
new file mode 100644
index 0000000..9fc405a
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-largedraws-expected.txt
@@ -0,0 +1 @@
+PASS: Draw commands with big numbers cause no problems.
diff --git a/LayoutTests/fast/canvas/canvas-largedraws.html b/LayoutTests/fast/canvas/canvas-largedraws.html
new file mode 100644
index 0000000..3285469
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-largedraws.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ function newCanvasContext() {
+ canvas = document.createElement("canvas");
+ canvas.width = 100;
+ canvas.height = 100;
+ return canvas.getContext("2d");
+ }
+
+ window.onload = function () {
+ ctx = newCanvasContext();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(10500000000, 10500000000);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(-10, 60);
+ ctx.fill();
+ ctx.getImageData(50, 25, 1, 1);
+
+ ctx = newCanvasContext();
+ ctx.fillStyle = '#0f0';
+ ctx.scale(4500000000, 4500000000);
+ ctx.moveTo(0, 0.5);
+ ctx.lineTo(2, 0.5);
+ ctx.stroke();
+ ctx.getImageData(50, 25, 1, 1);
+
+ ctx = newCanvasContext();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, -4500000000);
+ ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+ ctx.fill();
+ ctx.arc(105000000005, -105000000005, 105000000004, 0, 10500000000*Math.PI, false);
+ ctx.fill();
+ ctx.getImageData(50, 25, 1, 1);
+ }
+ </script>
+ PASS: Draw commands with big numbers cause no problems.
+ </body>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d884001..490998e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-09 Vincent Scheib <scheib at chromium.org>
+
+ Reviewed by James Robinson.
+
+ Clip update rectangle for Texture::updateSubRect to texture size
+ https://bugs.webkit.org/show_bug.cgi?id=49929
+
+ Test: fast/canvas/canvas-largedraws.html
+
+ * platform/graphics/gpu/Texture.cpp:
+ (WebCore::Texture::updateSubRect):
+
2010-12-09 Kenneth Russell <kbr at google.com>
Unreviewed. Another speculative Gtk build fix after r73669. Add
diff --git a/WebCore/platform/graphics/gpu/Texture.cpp b/WebCore/platform/graphics/gpu/Texture.cpp
index 18c9ead..0c57235 100644
--- a/WebCore/platform/graphics/gpu/Texture.cpp
+++ b/WebCore/platform/graphics/gpu/Texture.cpp
@@ -151,6 +151,9 @@ void Texture::load(void* pixels)
void Texture::updateSubRect(void* pixels, const IntRect updateRect)
{
+ IntRect updateRectSanitized(updateRect);
+ updateRectSanitized.intersect(IntRect(0, 0, m_tiles.totalSizeX(), m_tiles.totalSizeY()));
+
uint32_t* pixels32 = static_cast<uint32_t*>(pixels);
unsigned int glFormat = 0;
unsigned int glType = 0;
@@ -160,16 +163,16 @@ void Texture::updateSubRect(void* pixels, const IntRect updateRect)
ASSERT(glFormat == GraphicsContext3D::RGBA && glType == GraphicsContext3D::UNSIGNED_BYTE);
// FIXME: This could use PBO's to save doing an extra copy here.
}
- int tempBuffSize = // Temporary buffer size is the smaller of the max texture size or the updateRect
- min(m_tiles.maxTextureSize(), m_tiles.borderTexels() + updateRect.width()) *
- min(m_tiles.maxTextureSize(), m_tiles.borderTexels() + updateRect.height());
+ int tempBuffSize = // Temporary buffer size is the smaller of the max texture size or the updateRectSanitized
+ min(m_tiles.maxTextureSize(), m_tiles.borderTexels() + updateRectSanitized.width()) *
+ min(m_tiles.maxTextureSize(), m_tiles.borderTexels() + updateRectSanitized.height());
OwnArrayPtr<uint32_t> tempBuff(new uint32_t[tempBuffSize]);
for (int tile = 0; tile < m_tiles.numTiles(); tile++) {
// Intersect with tile
IntRect tileBoundsWithBorder = m_tiles.tileBoundsWithBorder(tile);
- IntRect updateRectIntersected = updateRect;
+ IntRect updateRectIntersected = updateRectSanitized;
updateRectIntersected.intersect(tileBoundsWithBorder);
IntRect dstRect = updateRectIntersected;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list