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

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

Issue 100443006: Remove some LatencyInfo merging code path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix android/mac build Created 6 years, 11 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 | « no previous file | cc/output/compositor_frame_metadata.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/base/latency_info_swap_promise.h" 5 #include "cc/base/latency_info_swap_promise.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace { 9 namespace {
10 ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType( 10 ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
(...skipping 16 matching lines...) Expand all
27 27
28 LatencyInfoSwapPromise::LatencyInfoSwapPromise(const ui::LatencyInfo& latency) 28 LatencyInfoSwapPromise::LatencyInfoSwapPromise(const ui::LatencyInfo& latency)
29 : latency_(latency) { 29 : latency_(latency) {
30 } 30 }
31 31
32 LatencyInfoSwapPromise::~LatencyInfoSwapPromise() { 32 LatencyInfoSwapPromise::~LatencyInfoSwapPromise() {
33 } 33 }
34 34
35 void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) { 35 void LatencyInfoSwapPromise::DidSwap(CompositorFrameMetadata* metadata) {
36 DCHECK(!latency_.terminated); 36 DCHECK(!latency_.terminated);
37 // TODO(miletus): Append the |latency_| into metadata's LatencyInfo list 37 metadata->latency_info.push_back(latency_);
38 // once we remove LatencyInfo merge in GPU side.
39 metadata->latency_info.MergeWith(latency_);
40 } 38 }
41 39
42 void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) { 40 void LatencyInfoSwapPromise::DidNotSwap(DidNotSwapReason reason) {
43 latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason), 41 latency_.AddLatencyNumber(DidNotSwapReasonToLatencyComponentType(reason),
44 0, 0); 42 0, 0);
45 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking 43 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking
46 // is enabled in GPU side. 44 // is enabled in GPU side.
47 // DCHECK(latency_.terminated); 45 // DCHECK(latency_.terminated);
48 } 46 }
49 47
50 } // namespace cc 48 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698