| 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..b64efd131e5e591a2780f6fe784950bbf00a3923 100644
|
| --- a/blimp/client/core/compositor/blimp_compositor.cc
|
| +++ b/blimp/client/core/compositor/blimp_compositor.cc
|
| @@ -26,6 +26,7 @@
|
| #include "cc/layers/surface_layer.h"
|
| #include "cc/output/compositor_frame_sink.h"
|
| #include "cc/proto/compositor_message.pb.h"
|
| +#include "cc/surfaces/direct_surface_embedding.h"
|
| #include "cc/surfaces/surface.h"
|
| #include "cc/surfaces/surface_factory.h"
|
| #include "cc/surfaces/surface_id_allocator.h"
|
| @@ -38,28 +39,6 @@
|
| namespace blimp {
|
| namespace client {
|
|
|
| -namespace {
|
| -
|
| -void SatisfyCallback(cc::SurfaceManager* manager,
|
| - const cc::SurfaceSequence& sequence) {
|
| - std::vector<uint32_t> sequences;
|
| - sequences.push_back(sequence.sequence);
|
| - manager->DidSatisfySequences(sequence.frame_sink_id, &sequences);
|
| -}
|
| -
|
| -void RequireCallback(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(
|
| @@ -327,14 +306,14 @@ void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) {
|
| current_surface_size_ = surface_size;
|
|
|
| // manager must outlive compositors using it.
|
| + cc::SurfaceId surface_id(surface_factory_->frame_sink_id(),
|
| + local_frame_id_);
|
| 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)));
|
| - content_layer->SetSurfaceId(
|
| - cc::SurfaceId(surface_factory_->frame_sink_id(), local_frame_id_), 1.f,
|
| - surface_size);
|
| + auto surface_embedding = base::MakeUnique<cc::DirectSurfaceEmbedding>(
|
| + cc::SurfaceInfo(surface_id, 1.f, surface_size), surface_manager);
|
| + scoped_refptr<cc::SurfaceLayer> content_layer = cc::SurfaceLayer::Create();
|
| + content_layer->SetSurfaceEmbedding(std::move(surface_embedding));
|
| content_layer->SetBounds(current_surface_size_);
|
| content_layer->SetIsDrawable(true);
|
| content_layer->SetContentsOpaque(true);
|
|
|