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

Unified Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2580493002: Splitting DidSwap in cc::SwapPromise into WillSwap and DidSwap (Closed)
Patch Set: x Created 4 years 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
« no previous file with comments | « no previous file | cc/layers/surface_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/compositor/blimp_compositor.cc
diff --git a/blimp/client/core/compositor/blimp_compositor.cc b/blimp/client/core/compositor/blimp_compositor.cc
index edafad482814c074fa7fddfe9e1c665d7a0e44df..ec80025d6b74ec8ff79793958e77e36045c863c1 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -73,10 +73,10 @@ class BlimpCompositor::FrameTrackingSwapPromise : public cc::SwapPromise {
// cc::SwapPromise implementation.
void DidActivate() override {}
- void DidSwap(cc::CompositorFrameMetadata* metadata) override {
- // DidSwap is called right before the CompositorFrame is submitted to the
- // CompositorFrameSink, so we make sure to delay the copy request till that
- // frame is submitted.
+ void WillSwap(cc::CompositorFrameMetadata* metadata) override {}
+ void DidSwap() override {
+ // DidSwap could be called on compositor thread and we need this to run on
+ // the main thread.
main_task_runner_->PostTask(
FROM_HERE,
base::Bind(&BlimpCompositor::MakeCopyRequestOnNextSwap,
« no previous file with comments | « no previous file | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698