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

Unified Diff: cc/output/swap_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/swap_promise.h
diff --git a/cc/output/swap_promise.h b/cc/output/swap_promise.h
index 1d6dabcbaa3366f127d87998b3c8f1555cffeb3f..719d53bcac1d2cb7b75a74632ba0a3d676cce731 100644
--- a/cc/output/swap_promise.h
+++ b/cc/output/swap_promise.h
@@ -5,7 +5,7 @@
#ifndef CC_OUTPUT_SWAP_PROMISE_H_
#define CC_OUTPUT_SWAP_PROMISE_H_
-#include "cc/output/compositor_frame_metadata.h"
+#include "cc/output/promise.h"
namespace cc {
@@ -27,25 +27,16 @@ namespace cc {
// DidNotSwap() are called at a particular thread. It is better to let the
// subclass carry thread-safe member data and operate on that member data in
// DidSwap() and DidNotSwap().
-class CC_EXPORT SwapPromise {
+class CC_EXPORT SwapPromise : public Promise {
public:
- enum DidNotSwapReason {
- DID_NOT_SWAP_UNKNOWN,
- SWAP_FAILS,
- COMMIT_FAILS,
- COMMIT_NO_UPDATE,
- };
-
SwapPromise() {}
- virtual ~SwapPromise() {}
+ ~SwapPromise() override;
virtual void DidSwap(CompositorFrameMetadata* metadata) = 0;
- virtual void DidNotSwap(DidNotSwapReason reason) = 0;
+ virtual void DidNotSwap(DidNotSwap::Reason reason) = 0;
- // 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;
+ bool OnDidSwap(CompositorFrameMetadata* metadata) final;
+ bool OnDidNotSwap(DidNotSwap::Reason reason) final;
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698