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

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

Issue 2583803002: Reland of Getting rid of CompositorFrameMetadata::satisfies_sequences (Closed)
Patch Set: 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/ipc/cc_param_traits_macros.h » ('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 636955d1b3f683b2e233815100ace19dab79c74f..c1e5c329d7d5ea43649b1ca4ca741003aed4750e 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -40,14 +40,16 @@
namespace {
-void SatisfyCallback(cc::SurfaceManager* manager,
+void SatisfyCallback(base::WeakPtr<cc::SurfaceManager> manager,
const cc::SurfaceSequence& sequence) {
+ if (!manager)
+ return;
std::vector<uint32_t> sequences;
sequences.push_back(sequence.sequence);
manager->DidSatisfySequences(sequence.frame_sink_id, &sequences);
}
-void RequireCallback(cc::SurfaceManager* manager,
+void RequireCallback(base::WeakPtr<cc::SurfaceManager> manager,
const cc::SurfaceId& id,
const cc::SurfaceSequence& sequence) {
cc::Surface* surface = manager->GetSurfaceForId(id);
@@ -330,8 +332,8 @@
cc::SurfaceManager* surface_manager =
GetEmbedderDeps()->GetSurfaceManager();
scoped_refptr<cc::SurfaceLayer> content_layer = cc::SurfaceLayer::Create(
- base::Bind(&SatisfyCallback, base::Unretained(surface_manager)),
- base::Bind(&RequireCallback, base::Unretained(surface_manager)));
+ base::Bind(&SatisfyCallback, surface_manager->GetWeakPtr()),
+ base::Bind(&RequireCallback, surface_manager->GetWeakPtr()));
content_layer->SetSurfaceId(
cc::SurfaceId(surface_factory_->frame_sink_id(), local_frame_id_), 1.f,
surface_size, false /* strecth_content_to_fill_bounds */);
« no previous file with comments | « no previous file | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698