Chromium Code Reviews| 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 011d9a091583d27ac07bb3598771baae74a3fc0a..0d5b4ac893839ff8f181a75ce471a7d66c3c5b7d 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 { |
| @@ -78,6 +79,23 @@ 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) { |
| + LOG(ERROR) << "Attempting to require callback on nonexistent surface"; |
|
danakj
2016/12/06 00:08:17
DLOG if you really want it. Strings are expensive
Fady Samuel
2016/12/06 00:12:14
If this happens then this is a bug. This means tha
danakj
2016/12/06 00:29:28
Then DCHECK instead?
Alex Z.
2016/12/06 15:52:09
Done.
|
| + return; |
| + } |
| + surface->AddDestructionDependency(sequence); |
| +} |
| + |
| +void CompositorFrameSinkSupport::Satisfy(const SurfaceSequence& sequence) { |
| + std::vector<uint32_t> sequences; |
|
danakj
2016/12/06 00:08:17
perviously i'd say construct this with size 1. but
Alex Z.
2016/12/06 15:52:09
Done.
|
| + sequences.push_back(sequence.sequence); |
| + surface_manager_->DidSatisfySequences(sequence.frame_sink_id, &sequences); |
| +} |
| + |
| void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() { |
| DCHECK_GT(ack_pending_count_, 0); |
| ack_pending_count_--; |