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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: cc/output/promise.h
diff --git a/cc/output/promise.h b/cc/output/promise.h
new file mode 100644
index 0000000000000000000000000000000000000000..61bf537bc47b192d0f6d3aa249fa3830de9ba745
--- /dev/null
+++ b/cc/output/promise.h
@@ -0,0 +1,50 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_OUTPUT_PROMISE_H_
+#define CC_OUTPUT_PROMISE_H_
+
+#include "base/basictypes.h"
+#include "cc/base/cc_export.h"
+#include "cc/output/compositor_frame_metadata.h"
+
+namespace cc {
+
+class CC_EXPORT Promise {
+ public:
+ struct DidNotSwap {
+ enum Reason {
+ UNKNOWN,
+ SWAP_FAILS,
+ COMMIT_FAILS,
+ COMMIT_NO_UPDATE,
+ };
+ };
+ struct DidNotActivate {
+ enum Reason {
+ UNKNOWN,
+ ACTIVATION_FAILS,
+ COMMIT_NO_UPDATE,
+ COMMIT_FAILS,
+ };
+ };
+
+ Promise() {}
+ virtual ~Promise();
+
+ virtual bool OnDidSwap(CompositorFrameMetadata*);
+ virtual bool OnDidNotSwap(DidNotSwap::Reason);
+
+ virtual bool OnDidActivate(CompositorFrameMetadata*);
+ virtual bool OnDidNotActivate(DidNotActivate::Reason);
+
+ // A non-zero trace id identifies a trace flow object that is embedded in the
+ // swap promise. This can be used for registering additional flow steps to
+ // visualize the object's path through the system.
+ virtual int64 TraceId() const = 0;
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_PROMISE_H_

Powered by Google App Engine
This is Rietveld 408576698