Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: LayoutTests/compositing/will-change/gpu-rasterization-hint.html

Issue 183103007: Implement will-change-based GPU rasterization hint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move hint from WebLayer to WebContentLayer Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/compositing/will-change/gpu-rasterization-hint-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8fb777c9b2020c0bcbae98a654549fcf0a84a65d
--- /dev/null
+++ b/LayoutTests/compositing/will-change/gpu-rasterization-hint.html
@@ -0,0 +1,111 @@
+<!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;
+ }
+
+ #willChangeBackgroundColor {
+ will-change: background-color;
+ top: 120px;
+ left: 0px;
+ }
+
+ #willChangeBackgroundPosition {
+ will-change: background-position;
+ top: 120px;
+ left: 60px;
+ }
+
+ #willChangeCombination {
+ will-change: z-index, width, position;
+ top: 120px;
+ left: 120px;
+ }
+ </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);
+ 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="willChangeBackgroundColor" class="shouldCompositeAndHaveGpuHint"></div>
+ <div id="willChangeBackgroundPosition" class="shouldCompositeAndHaveGpuHint"></div>
+ <div id="willChangeCombination" class="shouldCompositeAndHaveGpuHint"></div>
+
+ <pre id="layertree"></pre>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/compositing/will-change/gpu-rasterization-hint-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698