| Index: cc/surfaces/direct_surface_embedding.cc
|
| diff --git a/cc/surfaces/direct_surface_embedding.cc b/cc/surfaces/direct_surface_embedding.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0435dc7629eec52f65cb76b66d2ebc8f5a7eaed6
|
| --- /dev/null
|
| +++ b/cc/surfaces/direct_surface_embedding.cc
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "cc/surfaces/direct_surface_embedding.h"
|
| +#include "cc/surfaces/surface.h"
|
| +
|
| +namespace cc {
|
| +
|
| +SurfaceEmbedding* DirectSurfaceEmbedding::CloneImpl() const {
|
| + return new DirectSurfaceEmbedding(*this);
|
| +}
|
| +
|
| +void DirectSurfaceEmbedding::SatisfySequence(const SurfaceSequence& seq) {
|
| + std::vector<uint32_t> sequences;
|
| + sequences.push_back(seq.sequence);
|
| + manager_->DidSatisfySequences(seq.frame_sink_id, &sequences);
|
| +}
|
| +
|
| +void DirectSurfaceEmbedding::RequireSequence(const SurfaceSequence& seq) {
|
| + auto surface = manager_->GetSurfaceForId(id());
|
| + if (!surface) {
|
| + LOG(ERROR) << "Attempting to require callback on nonexistent surface";
|
| + return;
|
| + }
|
| + surface->AddDestructionDependency(seq);
|
| +}
|
| +
|
| +} // namespace cc
|
|
|