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

Unified Diff: cc/output/latency_info_swap_promise.cc

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « cc/output/latency_info_swap_promise.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/latency_info_swap_promise.cc
diff --git a/cc/base/latency_info_swap_promise.cc b/cc/output/latency_info_swap_promise.cc
similarity index 55%
rename from cc/base/latency_info_swap_promise.cc
rename to cc/output/latency_info_swap_promise.cc
index 8c6ee0ec1313a157e1094c2b90b4acaf045729bb..3c0716294adf3a99e1cf3fab4ba0350d42aea931 100644
--- a/cc/base/latency_info_swap_promise.cc
+++ b/cc/output/latency_info_swap_promise.cc
@@ -2,25 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "cc/base/latency_info_swap_promise.h"
+#include "cc/output/latency_info_swap_promise.h"
#include "base/logging.h"
namespace {
- ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
- cc::SwapPromise::DidNotSwapReason reason) {
- switch (reason) {
- case cc::SwapPromise::DID_NOT_SWAP_UNKNOWN:
- case cc::SwapPromise::SWAP_FAILS:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
- case cc::SwapPromise::COMMIT_FAILS:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT;
- case cc::SwapPromise::COMMIT_NO_UPDATE:
- return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT;
- }
- NOTREACHED() << "Unhandled DidNotSwapReason.";
- return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
+ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
+ cc::SwapPromise::DidNotSwapReason reason) {
+ switch (reason) {
+ case cc::SwapPromise::DID_NOT_SWAP_UNKNOWN:
+ case cc::SwapPromise::SWAP_FAILS:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
+ case cc::SwapPromise::COMMIT_FAILS:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT;
+ case cc::SwapPromise::COMMIT_NO_UPDATE:
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT;
}
+ NOTREACHED() << "Unhandled DidNotSwapReason.";
+ return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
+}
} // namespace
namespace cc {
@@ -38,8 +38,8 @@ void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
}
void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) {
- latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason),
- 0, 0);
+ latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason), 0,
+ 0);
// TODO(miletus): Turn this back on once per-event LatencyInfo tracking
// is enabled in GPU side.
// DCHECK(latency_.terminated);
« no previous file with comments | « cc/output/latency_info_swap_promise.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698