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 a6e3b2506e8cd66bfe47d73518214a98abff6bca..185742c154ff7376fbbc7364ebb689d42d062b69 100644 |
--- a/blimp/client/core/compositor/blimp_compositor.cc |
+++ b/blimp/client/core/compositor/blimp_compositor.cc |
@@ -38,30 +38,6 @@ |
namespace blimp { |
namespace client { |
-namespace { |
- |
-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(base::WeakPtr<cc::SurfaceManager> manager, |
- const cc::SurfaceId& id, |
- const cc::SurfaceSequence& sequence) { |
- cc::Surface* surface = manager->GetSurfaceForId(id); |
- if (!surface) { |
- LOG(ERROR) << "Attempting to require callback on nonexistent surface"; |
- return; |
- } |
- surface->AddDestructionDependency(sequence); |
-} |
- |
-} // namespace |
- |
class BlimpCompositor::FrameTrackingSwapPromise : public cc::SwapPromise { |
public: |
FrameTrackingSwapPromise( |
@@ -331,12 +307,13 @@ void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) { |
// manager must outlive compositors using it. |
cc::SurfaceManager* surface_manager = |
GetEmbedderDeps()->GetSurfaceManager(); |
- scoped_refptr<cc::SurfaceLayer> content_layer = cc::SurfaceLayer::Create( |
- 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 /* stretch_content_to_fill_bounds */); |
+ auto content_layer = |
+ cc::SurfaceLayer::Create(surface_manager->reference_factory()); |
+ cc::SurfaceId surface_id(surface_factory_->frame_sink_id(), |
+ local_frame_id_); |
+ content_layer->SetSurfaceInfo( |
+ cc::SurfaceInfo(surface_id, 1.f, surface_size), |
+ false /* stretch_content_to_fill_bounds */); |
content_layer->SetBounds(current_surface_size_); |
content_layer->SetIsDrawable(true); |
content_layer->SetContentsOpaque(true); |