Index: LayoutTests/compositing/will-change/gpu-rasterization-hint.html |
diff --git a/LayoutTests/compositing/will-change/gpu-rasterization-hint.html b/LayoutTests/compositing/will-change/gpu-rasterization-hint.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..84c5ed0e56c18299af2672889188f4e3338f7ac2 |
--- /dev/null |
+++ b/LayoutTests/compositing/will-change/gpu-rasterization-hint.html |
@@ -0,0 +1,97 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <style> |
+ .shouldCompositeAndHaveGpuHint { |
+ position: absolute; |
+ width: 50px; |
+ height: 50px; |
+ background-color: green; |
+ } |
+ |
+ .shouldCompositeButNotHaveGpuHint { |
+ position: absolute; |
+ width: 50px; |
+ height: 50px; |
+ background-color: blue; |
+ } |
+ |
+ .shouldNotComposite { |
+ position: absolute; |
+ width: 50px; |
+ height: 50px; |
+ background-color: red; |
+ } |
+ |
+ #willChangeAuto { |
+ will-change: auto; |
+ top: 0px; |
+ left: 0px; |
+ } |
+ |
+ #willChangeZIndex { |
+ will-change: z-index; |
+ top: 0px; |
+ left: 60px; |
+ } |
+ |
+ #willChangeOpacity { |
+ will-change: opacity; |
+ top: 0px; |
+ left: 120px; |
+ } |
+ |
+ #willChangeContents { |
+ will-change: contents; |
+ top: 60px; |
+ left: 0px; |
+ } |
+ |
+ #willChangeWidth { |
+ will-change: width; |
+ top: 60px; |
+ left: 60px; |
+ } |
+ |
+ #willChangeHeight { |
+ will-change: height; |
+ top: 60px; |
+ left: 120px; |
+ } |
+ |
+ #willChangeCombination { |
+ will-change: z-index, width, position; |
+ top: 120px; |
+ left: 0px; |
+ } |
+ </style> |
+ |
+ <script> |
+ if (window.internals) |
+ window.internals.settings.setAcceleratedCompositingForGpuRasterizationHintEnabled(true); |
+ |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ } |
+ |
+ window.addEventListener('load', function() { |
+ if (window.testRunner) { |
+ document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document); |
Ian Vollick
2014/03/07 15:33:52
Nit: it would be nice to have a flag to optionally
ajuma
2014/03/07 17:03:41
This would be of limited value right now, since on
|
+ testRunner.notifyDone(); |
+ } |
+ }, false); |
+ </script> |
+</head> |
+<body> |
+ <div id="willChangeAuto" class="shouldNotComposite"></div> |
+ <div id="willChangeZIndex" class="shouldNotComposite"></div> |
+ <div id="willChangeOpacity" class="shouldCompositeButNotHaveGpuHint"></div> |
+ <div id="willChangeContents" class="shouldCompositeAndHaveGpuHint"></div> |
+ <div id="willChangeWidth" class="shouldCompositeAndHaveGpuHint"></div> |
+ <div id="willChangeHeight" class="shouldCompositeAndHaveGpuHint"></div> |
+ <div id="willChangeCombination" class="shouldCompositeAndHaveGpuHint"></div> |
+ |
+ <pre id="layertree"></pre> |
+</body> |
+</html> |