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

Side by Side Diff: cc/output/latency_info_swap_promise.cc

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation again Created 4 years, 4 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
« no previous file with comments | « cc/output/latency_info_swap_promise.h ('k') | cc/output/swap_promise.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/latency_info_swap_promise.h" 5 #include "cc/output/latency_info_swap_promise.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 LatencyInfoSwapPromise::~LatencyInfoSwapPromise() { 35 LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {
36 } 36 }
37 37
38 void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) { 38 void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
39 DCHECK(!latency_.terminated()); 39 DCHECK(!latency_.terminated());
40 metadata->latency_info.push_back(latency_); 40 metadata->latency_info.push_back(latency_);
41 } 41 }
42 42
43 void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) { 43 SwapPromise::DidNotSwapAction LatencyInfoSwapPromise::DidNotSwap(
44 DidNotSwapReason reason) {
44 latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason), 0, 45 latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason), 0,
45 0); 46 0);
46 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking 47 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking
47 // is enabled in GPU side. 48 // is enabled in GPU side.
48 // DCHECK(latency_.terminated); 49 // DCHECK(latency_.terminated);
50 return DidNotSwapAction::BREAK_PROMISE;
49 } 51 }
50 52
51 int64_t LatencyInfoSwapPromise::TraceId() const { 53 int64_t LatencyInfoSwapPromise::TraceId() const {
52 return latency_.trace_id(); 54 return latency_.trace_id();
53 } 55 }
54 56
55 // Trace the original LatencyInfo of a LatencyInfoSwapPromise 57 // Trace the original LatencyInfo of a LatencyInfoSwapPromise
56 void LatencyInfoSwapPromise::OnCommit() { 58 void LatencyInfoSwapPromise::OnCommit() {
57 TRACE_EVENT_WITH_FLOW1("input,benchmark", 59 TRACE_EVENT_WITH_FLOW1("input,benchmark",
58 "LatencyInfo.Flow", 60 "LatencyInfo.Flow",
59 TRACE_ID_DONT_MANGLE(TraceId()), 61 TRACE_ID_DONT_MANGLE(TraceId()),
60 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, 62 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT,
61 "step", "HandleInputEventMainCommit"); 63 "step", "HandleInputEventMainCommit");
62 } 64 }
63 65
64 } // namespace cc 66 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/latency_info_swap_promise.h ('k') | cc/output/swap_promise.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698