Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-10-14 Adrienne Walker <enne@google.com>
Reviewed by James Robinson. Add a test for very large image layers. Skip this test for mac-wk2 because of the use of layerTreeAsText(). https://bugs.webkit.org/show_bug.cgi?id=47016 * compositing/tiling/huge-layer-img.html: Added. * platform/chromium-gpu/compositing/tiling/huge-layer-img-expected.txt: Added. * platform/mac-wk2/Skipped: * platform/mac/compositing/tiling/huge-layer-img-expected.txt: Added. 2010-10-14 Adrienne Walker <enne@google.com> Reviewed by James Robinson. Add a short-term solution for large layers. Layers that are too large to be contained in a single texture just upload the portion of the layer that is within the content rect. A longer-term solution is still tiling with proper memory management. Layers that have full 3D transforms (more than just translations) are still not drawn. https://bugs.webkit.org/show_bug.cgi?id=47016 Test: compositing/tiling * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::requiresClippedUpdateRect): (WebCore::ContentLayerChromium::calculateClippedUpdateRect): (WebCore::ContentLayerChromium::updateContents): (WebCore::ContentLayerChromium::updateTextureRect): (WebCore::ContentLayerChromium::draw): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::updateContents): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayerContentRect): Canonical link: https://commits.webkit.org/60334@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
e603c04
commit 966413c3dfc7cc99d045e3c72328bd9b97976678
Showing
11 changed files
with
239 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Test of very large image layer</title> | ||
|
||
<style type="text/css" media="screen"> | ||
#container { | ||
width: 500px; | ||
height: 20000px; | ||
-webkit-transform:translateZ(0); | ||
} | ||
</style> | ||
<script type="text/javascript" charset="utf-8"> | ||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
} | ||
|
||
function testOnLoad() | ||
{ | ||
var canvas = document.createElement('canvas'); | ||
var img = document.getElementById("container") | ||
canvas.width = img.width; | ||
canvas.height = img.height; | ||
var context = canvas.getContext('2d'); | ||
context.fillStyle = "yellow"; | ||
context.fillRect(0, 0, canvas.width, canvas.height); | ||
context.fillStyle = "red"; | ||
context.fillRect(50, 50, 200, 200); | ||
context.fillStyle = "blue"; | ||
context.fillRect(50, canvas.height - 250, 200, 200); | ||
img.src = canvas.toDataURL(); | ||
|
||
window.setTimeout(function() { | ||
if (window.layoutTestController) { | ||
document.getElementById('layers').innerHTML = layoutTestController.layerTreeAsText(); | ||
layoutTestController.notifyDone(); | ||
} | ||
}, 0); | ||
} | ||
|
||
window.addEventListener('load', testOnLoad, false); | ||
</script> | ||
</head> | ||
<body> | ||
<p> | ||
The yellow box should be large enough to scroll off the bottom. | ||
There should be a red box on the first page and a blue box | ||
near the bottom of the yellow box. This tests that we can support | ||
very large composited image layers. | ||
</p> | ||
<img id="container"> | ||
<pre id="layers">Layer tree appears here in DRT.</pre> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,19 @@ | ||
The yellow box should be large enough to scroll off the bottom. There should be a red box on the first page and a blue box near the bottom of the yellow box. This tests that we can support very large composited image layers. | ||
|
||
|
||
(GraphicsLayer | ||
(bounds 785.00 20119.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 785.00 20119.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 8.00 72.00) | ||
(bounds 500.00 20000.00) | ||
(drawsContent 1) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,20 @@ | ||
The yellow box should be large enough to scroll off the bottom. There should be a red box on the first page and a blue box near the bottom of the yellow box. This tests that we can support very large composited image layers. | ||
|
||
|
||
(GraphicsLayer | ||
(bounds 785.00 20113.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 785.00 20113.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 8.00 68.00) | ||
(bounds 500.00 20000.00) | ||
(usingTiledLayer 1) | ||
(drawsContent 1) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters