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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/resources/text-based-repaint.js

Issue 2383323002: [SPv2] Introduce an option to output the GraphicsLayer tree as a flat layer list. (Closed)
Patch Set: none Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Asynchronous tests should manually call finishRepaintTest at the appropriate 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate
2 // time. 2 // time.
3 window.testIsAsync = false; 3 window.testIsAsync = false;
4 window.outputRepaintRects = true; 4 window.outputRepaintRects = true;
5 window.outputLayerList = false;
5 6
6 // All repaint tests are asynchronous. 7 // All repaint tests are asynchronous.
7 if (window.testRunner) 8 if (window.testRunner)
8 testRunner.waitUntilDone(); 9 testRunner.waitUntilDone();
9 10
10 if (window.internals) { 11 if (window.internals) {
11 internals.settings.setUseDefaultImageInterpolationQuality(true); 12 internals.settings.setUseDefaultImageInterpolationQuality(true);
12 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true; 13 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true;
13 } 14 }
14 15
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return; 53 return;
53 54
54 // Force a style recalc. 55 // Force a style recalc.
55 forceStyleRecalc(); 56 forceStyleRecalc();
56 57
57 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS; 58 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS;
58 59
59 if (window.layerTreeAsTextAdditionalFlags) 60 if (window.layerTreeAsTextAdditionalFlags)
60 flags |= window.layerTreeAsTextAdditionalFlags; 61 flags |= window.layerTreeAsTextAdditionalFlags;
61 62
63 if (window.outputLayerList)
64 flags |= window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST;
65
62 var repaintRects = window.internals.layerTreeAsText(document, flags); 66 var repaintRects = window.internals.layerTreeAsText(document, flags);
63 67
64 internals.stopTrackingRepaints(document); 68 internals.stopTrackingRepaints(document);
65 69
66 // Play nice with JS tests which may want to print out assert results. 70 // Play nice with JS tests which may want to print out assert results.
67 if (window.isJsTest) 71 if (window.isJsTest)
68 window.outputRepaintRects = false; 72 window.outputRepaintRects = false;
69 73
70 if (window.outputRepaintRects) 74 if (window.outputRepaintRects)
71 testRunner.setCustomTextOutput(repaintRects); 75 testRunner.setCustomTextOutput(repaintRects);
72 76
73 if (window.afterTest) 77 if (window.afterTest)
74 window.afterTest(); 78 window.afterTest();
75 79
76 // Play nice with async JS tests which want to notifyDone themselves. 80 // Play nice with async JS tests which want to notifyDone themselves.
77 if (!window.jsTestIsAsync) 81 if (!window.jsTestIsAsync)
78 testRunner.notifyDone(); 82 testRunner.notifyDone();
79 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698