Commit e9be5279 authored by khmel@chromium.org's avatar khmel@chromium.org Committed by Commit Bot

arc: Reorginize tracing tool.

This is a preparation for adding new performance overview view that
would reuse existing functionality.

TEST=Locally and existing functionality works.
     In context of prototype.
BUG=b/143532713

Change-Id: I500d7a1605273217b45e673e7cc4a7284b82eb9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892100
Commit-Queue: Yury Khmel <khmel@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711330}
parent 261d69bf
...@@ -609,7 +609,8 @@ ...@@ -609,7 +609,8 @@
<include name="IDR_ARC_GRAPHICS_TRACING_HTML" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing.html" compress="gzip" type="BINDATA"/> <include name="IDR_ARC_GRAPHICS_TRACING_HTML" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing.html" compress="gzip" type="BINDATA"/>
<include name="IDR_ARC_GRAPHICS_TRACING_JS" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing.js" compress="gzip" type="BINDATA" /> <include name="IDR_ARC_GRAPHICS_TRACING_JS" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing.js" compress="gzip" type="BINDATA" />
<include name="IDR_ARC_GRAPHICS_TRACING_UI_JS" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing_ui.js" compress="gzip" type="BINDATA" /> <include name="IDR_ARC_GRAPHICS_TRACING_UI_JS" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing_ui.js" compress="gzip" type="BINDATA" />
<include name="IDR_ARC_GRAPHICS_TRACING_CSS" file="resources\chromeos\arc_graphics_tracing\arc_graphics_tracing.css" compress="gzip" type="BINDATA" /> <include name="IDR_ARC_TRACING_UI_JS" file="resources\chromeos\arc_graphics_tracing\arc_tracing_ui.js" compress="gzip" type="BINDATA" />
<include name="IDR_ARC_TRACING_CSS" file="resources\chromeos\arc_graphics_tracing\arc_tracing.css" compress="gzip" type="BINDATA" />
</if> </if>
<if expr="chromeos"> <if expr="chromeos">
<include name="IDR_MACHINE_LEARNING_INTERNALS_GRAPH_EXECUTOR_MOJO_JS" file="${root_gen_dir}\chromeos\services\machine_learning\public\mojom\graph_executor.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" /> <include name="IDR_MACHINE_LEARNING_INTERNALS_GRAPH_EXECUTOR_MOJO_JS" file="${root_gen_dir}\chromeos\services\machine_learning\public\mojom\graph_executor.mojom-lite.js" use_base_dir="false" type="BINDATA" compress="gzip" />
......
...@@ -6,24 +6,25 @@ ...@@ -6,24 +6,25 @@
<html> <html>
<head> <head>
<meta charset=utf-8> <meta charset=utf-8>
<link rel="stylesheet" href="arc_graphics_tracing.css"> <link rel="stylesheet" href="arc_tracing.css">
<script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/cr/ui.js"></script> <script src="chrome://resources/js/cr/ui.js"></script>
<script src="chrome://resources/js/util.js"></script> <script src="chrome://resources/js/util.js"></script>
<script src="arc_tracing_ui.js"></script>
<script src="arc_graphics_tracing_ui.js"></script> <script src="arc_graphics_tracing_ui.js"></script>
<script src="arc_graphics_tracing.js"></script> <script src="arc_graphics_tracing.js"></script>
<title>ARC graphics tracing</title> <title>ARC graphics tracing</title>
</head> </head>
<body> <body>
<div id="arc-graphics-tracing-control"> <div>
<h3>ARC graphics tracing</h3> <h3>ARC graphics tracing</h3>
Use <b>Ctrl+Shift+G</b> in active Android app to start/stop tracing. Use <b>Ctrl+Shift+G</b> in active Android app to start/stop tracing.
<input type="checkbox" id="arc-graphics-tracing-stop-on-jank" checked> <input type="checkbox" id="arc-graphics-tracing-stop-on-jank" checked>
Stop on jank. Status: <i id="arc-graphics-tracing-status">Idle</i> Stop on jank. Status: <i id="arc-tracing-status">Idle</i>
<div id="arc-graphics-tracing-control-buttons"> <div id="arc-tracing-control-buttons">
<button type="button" id="arc-graphics-tracing-save" disabled>Save <button type="button" id="arc-graphics-tracing-save" disabled>Save
</button> </button>
<button type="button" id="arc-graphics-tracing-load">Load</button> <button type="button" id="arc-tracing-load">Load</button>
</div> </div>
</div> </div>
<hr> <hr>
......
...@@ -18,13 +18,10 @@ cr.define('cr.ArcGraphicsTracing', function() { ...@@ -18,13 +18,10 @@ cr.define('cr.ArcGraphicsTracing', function() {
}, false); }, false);
chrome.send('ready'); chrome.send('ready');
chrome.send('setStopOnJank', [stopOnJank.checked]); chrome.send('setStopOnJank', [stopOnJank.checked]);
initializeUi(); initializeGraphicsUi();
}, },
setStatus: function(statusText) { setStatus: setStatus,
var status = $('arc-graphics-tracing-status');
status.textContent = statusText;
},
setModel: function(model) { setModel: function(model) {
setGraphicBuffersModel(model); setGraphicBuffersModel(model);
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
display: block; display: block;
} }
#arc-graphics-tracing-control-buttons { #arc-tracing-control-buttons {
float: right; float: right;
} }
......
...@@ -20,7 +20,8 @@ namespace { ...@@ -20,7 +20,8 @@ namespace {
constexpr char kArcGraphicsTracingJsPath[] = "arc_graphics_tracing.js"; constexpr char kArcGraphicsTracingJsPath[] = "arc_graphics_tracing.js";
constexpr char kArcGraphicsTracingUiJsPath[] = "arc_graphics_tracing_ui.js"; constexpr char kArcGraphicsTracingUiJsPath[] = "arc_graphics_tracing_ui.js";
constexpr char kArcGraphicsTracingCssPath[] = "arc_graphics_tracing.css"; constexpr char kArcTracingUiJsPath[] = "arc_tracing_ui.js";
constexpr char kArcTracingCssPath[] = "arc_tracing.css";
content::WebUIDataSource* CreateDataSource() { content::WebUIDataSource* CreateDataSource() {
content::WebUIDataSource* source = content::WebUIDataSource* source =
...@@ -31,8 +32,8 @@ content::WebUIDataSource* CreateDataSource() { ...@@ -31,8 +32,8 @@ content::WebUIDataSource* CreateDataSource() {
IDR_ARC_GRAPHICS_TRACING_JS); IDR_ARC_GRAPHICS_TRACING_JS);
source->AddResourcePath(kArcGraphicsTracingUiJsPath, source->AddResourcePath(kArcGraphicsTracingUiJsPath,
IDR_ARC_GRAPHICS_TRACING_UI_JS); IDR_ARC_GRAPHICS_TRACING_UI_JS);
source->AddResourcePath(kArcGraphicsTracingCssPath, source->AddResourcePath(kArcTracingCssPath, IDR_ARC_TRACING_CSS);
IDR_ARC_GRAPHICS_TRACING_CSS); source->AddResourcePath(kArcTracingUiJsPath, IDR_ARC_TRACING_UI_JS);
source->OverrideContentSecurityPolicyScriptSrc( source->OverrideContentSecurityPolicyScriptSrc(
"script-src chrome://resources 'self';"); "script-src chrome://resources 'self';");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment