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

Side by Side Diff: cc/output/swap_promise.h

Issue 1178963003: Trace main thread commit in flow events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make OnCommitForSwapPromises protected and be called from WillCommit. Created 5 years, 6 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.cc ('k') | cc/trees/layer_tree_host.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 #ifndef CC_OUTPUT_SWAP_PROMISE_H_ 5 #ifndef CC_OUTPUT_SWAP_PROMISE_H_
6 #define CC_OUTPUT_SWAP_PROMISE_H_ 6 #define CC_OUTPUT_SWAP_PROMISE_H_
7 7
8 #include "cc/output/compositor_frame_metadata.h" 8 #include "cc/output/compositor_frame_metadata.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 COMMIT_NO_UPDATE, 47 COMMIT_NO_UPDATE,
48 ACTIVATION_FAILS, 48 ACTIVATION_FAILS,
49 }; 49 };
50 50
51 SwapPromise() {} 51 SwapPromise() {}
52 virtual ~SwapPromise() {} 52 virtual ~SwapPromise() {}
53 53
54 virtual void DidActivate() = 0; 54 virtual void DidActivate() = 0;
55 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; 55 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0;
56 virtual void DidNotSwap(DidNotSwapReason reason) = 0; 56 virtual void DidNotSwap(DidNotSwapReason reason) = 0;
57 // This is called when the main thread starts a (blocking) commit
58 virtual void OnCommit() {}
57 59
58 // A non-zero trace id identifies a trace flow object that is embedded in the 60 // A non-zero trace id identifies a trace flow object that is embedded in the
59 // swap promise. This can be used for registering additional flow steps to 61 // swap promise. This can be used for registering additional flow steps to
60 // visualize the object's path through the system. 62 // visualize the object's path through the system.
61 virtual int64 TraceId() const = 0; 63 virtual int64 TraceId() const = 0;
62 }; 64 };
63 65
64 } // namespace cc 66 } // namespace cc
65 67
66 #endif // CC_OUTPUT_SWAP_PROMISE_H_ 68 #endif // CC_OUTPUT_SWAP_PROMISE_H_
OLDNEW
« no previous file with comments | « cc/output/latency_info_swap_promise.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698