| Index: cc/surfaces/compositor_frame_sink_support.cc
|
| diff --git a/cc/surfaces/compositor_frame_sink_support.cc b/cc/surfaces/compositor_frame_sink_support.cc
|
| index c049ac7f3c0861e1d97485c851c83c2895ded975..d28ea4a2d4f536c041f515d37c2f613847f5d114 100644
|
| --- a/cc/surfaces/compositor_frame_sink_support.cc
|
| +++ b/cc/surfaces/compositor_frame_sink_support.cc
|
| @@ -8,6 +8,7 @@
|
| #include "cc/scheduler/begin_frame_source.h"
|
| #include "cc/surfaces/compositor_frame_sink_support_client.h"
|
| #include "cc/surfaces/display.h"
|
| +#include "cc/surfaces/surface.h"
|
| #include "cc/surfaces/surface_manager.h"
|
|
|
| namespace cc {
|
| @@ -83,6 +84,22 @@ void CompositorFrameSinkSupport::SubmitCompositorFrame(
|
| }
|
| }
|
|
|
| +void CompositorFrameSinkSupport::Require(const LocalFrameId& local_frame_id,
|
| + const SurfaceSequence& sequence) {
|
| + Surface* surface = surface_manager_->GetSurfaceForId(
|
| + SurfaceId(frame_sink_id_, local_frame_id));
|
| + if (!surface) {
|
| + DLOG(ERROR) << "Attempting to require callback on nonexistent surface";
|
| + return;
|
| + }
|
| + surface->AddDestructionDependency(sequence);
|
| +}
|
| +
|
| +void CompositorFrameSinkSupport::Satisfy(const SurfaceSequence& sequence) {
|
| + std::vector<uint32_t> sequences = {sequence.sequence};
|
| + surface_manager_->DidSatisfySequences(sequence.frame_sink_id, &sequences);
|
| +}
|
| +
|
| void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() {
|
| DCHECK_GT(ack_pending_count_, 0);
|
| ack_pending_count_--;
|
|
|