| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/layers/surface_holder.h" |
| 6 |
| 7 #include "cc/layers/surface_layer.h" |
| 8 #include "cc/surfaces/surface.h" |
| 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "cc/trees/layer_tree_host.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 SurfaceHolder::SurfaceHolder(SurfaceId id, SatisfyCallback callback) |
| 15 : id_(id), satisfy_callback_(callback) { |
| 16 } |
| 17 |
| 18 SurfaceHolder::~SurfaceHolder() { |
| 19 DCHECK(sequences_.empty()) |
| 20 << ": SurfaceLayer attached to LayerTreeHost after GetSequenceSet called"; |
| 21 } |
| 22 |
| 23 void SurfaceHolder::AddSurfaceSequence(SurfaceSequence sequence) { |
| 24 sequences_.insert(sequence); |
| 25 } |
| 26 |
| 27 void SurfaceHolder::GetSequenceSet(std::set<SurfaceSequence>* sequences) { |
| 28 sequences_.swap(*sequences); |
| 29 } |
| 30 |
| 31 } // namespace cc |
| OLD | NEW |