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

Unified Diff: ui/android/delegated_frame_host_android.cc

Issue 2585543003: Revert 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 | « content/browser/renderer_host/delegated_frame_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/delegated_frame_host_android.cc
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc
index 2b60b31ae63dcb8db378ba6e66890ec916bb36ec..ec13e0d93e187912edd095c06d6c5c52bdaad1bd 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -25,16 +25,14 @@
namespace {
-void SatisfyCallback(base::WeakPtr<cc::SurfaceManager> manager,
+void SatisfyCallback(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(base::WeakPtr<cc::SurfaceManager> manager,
+void RequireCallback(cc::SurfaceManager* manager,
const cc::SurfaceId& id,
const cc::SurfaceSequence& sequence) {
cc::Surface* surface = manager->GetSurfaceForId(id);
@@ -52,8 +50,8 @@
bool surface_opaque) {
// manager must outlive compositors using it.
scoped_refptr<cc::SurfaceLayer> layer = cc::SurfaceLayer::Create(
- base::Bind(&SatisfyCallback, surface_manager->GetWeakPtr()),
- base::Bind(&RequireCallback, surface_manager->GetWeakPtr()));
+ base::Bind(&SatisfyCallback, base::Unretained(surface_manager)),
+ base::Bind(&RequireCallback, base::Unretained(surface_manager)));
layer->SetSurfaceId(surface_id, 1.f, surface_size,
false /* strecth_content_to_fill_bounds */);
layer->SetBounds(surface_size);
« no previous file with comments | « content/browser/renderer_host/delegated_frame_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698