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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) Created 5 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_OUTPUT_PROMISE_H_
6 #define CC_OUTPUT_PROMISE_H_
7
8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/output/compositor_frame_metadata.h"
11
12 namespace cc {
13
14 class CC_EXPORT Promise {
15 public:
16 struct DidNotSwap {
17 enum Reason {
18 UNKNOWN,
19 SWAP_FAILS,
20 COMMIT_FAILS,
21 COMMIT_NO_UPDATE,
22 };
23 };
24 struct DidNotActivate {
25 enum Reason {
26 UNKNOWN,
27 ACTIVATION_FAILS,
28 COMMIT_NO_UPDATE,
29 COMMIT_FAILS,
30 };
31 };
32
33 Promise() {}
34 virtual ~Promise();
35
36 virtual bool OnDidSwap(CompositorFrameMetadata*);
37 virtual bool OnDidNotSwap(DidNotSwap::Reason);
38
39 virtual bool OnDidActivate(CompositorFrameMetadata*);
40 virtual bool OnDidNotActivate(DidNotActivate::Reason);
41
42 // A non-zero trace id identifies a trace flow object that is embedded in the
43 // swap promise. This can be used for registering additional flow steps to
44 // visualize the object's path through the system.
45 virtual int64 TraceId() const = 0;
46 };
47
48 } // namespace cc
49
50 #endif // CC_OUTPUT_PROMISE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698