| 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..c290ee3448c8d02c146f641e08c68a16482c4c28 100644
|
| --- a/blimp/client/core/compositor/blimp_compositor.cc
|
| +++ b/blimp/client/core/compositor/blimp_compositor.cc
|
| @@ -30,6 +30,7 @@
|
| #include "cc/surfaces/surface_factory.h"
|
| #include "cc/surfaces/surface_id_allocator.h"
|
| #include "cc/surfaces/surface_manager.h"
|
| +#include "cc/surfaces/surface_ref_base.h"
|
| #include "cc/trees/layer_tree_host_in_process.h"
|
| #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
|
| #include "net/base/net_errors.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,12 @@ 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);
|
| + surface_manager->NewSurfaceRef(surface_id, 1.f, surface_size));
|
| content_layer->SetBounds(current_surface_size_);
|
| content_layer->SetIsDrawable(true);
|
| content_layer->SetContentsOpaque(true);
|
|
|