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

Unified Diff: cc/trees/thread_proxy.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: introduce a separate queue for with_swap messages Created 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index e16adb9a5508d09e39f889b175618d4c80ec3b51..835dd7a65be3f3b986ac0e5775b580fd6f650f90 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -27,6 +27,8 @@
#include "cc/trees/layer_tree_impl.h"
#include "ui/gfx/frame_time.h"
+namespace cc {
+
namespace {
// Measured in seconds.
@@ -34,21 +36,19 @@ const double kSmoothnessTakesPriorityExpirationDelay = 0.25;
class SwapPromiseChecker {
public:
- explicit SwapPromiseChecker(cc::LayerTreeHost* layer_tree_host)
+ explicit SwapPromiseChecker(LayerTreeHost* layer_tree_host)
: layer_tree_host_(layer_tree_host) {}
~SwapPromiseChecker() {
- layer_tree_host_->BreakSwapPromises(cc::SwapPromise::COMMIT_FAILS);
+ layer_tree_host_->BreakSwapPromises(SwapPromise::COMMIT_FAILS);
}
private:
- cc::LayerTreeHost* layer_tree_host_;
+ LayerTreeHost* layer_tree_host_;
};
} // namespace
-namespace cc {
-
struct ThreadProxy::CommitPendingRequest {
CompletionEvent completion;
bool commit_pending;
@@ -839,6 +839,7 @@ void ThreadProxy::BeginMainFrame(
// went through, and input should no longer be throttled, etc.
layer_tree_host()->CommitComplete();
layer_tree_host()->DidBeginMainFrame();
+ layer_tree_host()->BreakSwapPromises(SwapPromise::COMMIT_NO_UPDATE);
return;
}

Powered by Google App Engine
This is Rietveld 408576698