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

Unified Diff: cc/output/swap_promise.h

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments and add tests Created 4 years, 4 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 f3c3fbdde811651bb9a941d307b7372c3103ddee..83892fa0d0343cef55fac14e0f466f9bb56447c5 100644
--- a/cc/output/swap_promise.h
+++ b/cc/output/swap_promise.h
@@ -50,12 +50,19 @@ class CC_EXPORT SwapPromise {
ACTIVATION_FAILS,
};
+ enum class DidNotSwapAction {
+ DEFAULT_ACTION,
danakj 2016/08/10 01:04:15 I'd like this name to actually talk about what it
svartmetal 2016/08/10 17:38:21 Done.
+ KEEP_ACTIVE,
+ };
+
SwapPromise() {}
virtual ~SwapPromise() {}
virtual void DidActivate() = 0;
virtual void DidSwap(CompositorFrameMetadata* metadata) = 0;
- virtual void DidNotSwap(DidNotSwapReason reason) = 0;
+ // Return |KEEP_ACTIVE| if this promise should remain active (should not be
+ // broken by the owner).
+ virtual DidNotSwapAction DidNotSwap(DidNotSwapReason reason) = 0;
// This is called when the main thread starts a (blocking) commit
virtual void OnCommit() {}

Powered by Google App Engine
This is Rietveld 408576698