OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/layer_updater.h" | 5 #include "cc/layer_updater.h" |
6 | 6 |
| 7 #include "cc/prioritized_resource.h" |
| 8 |
7 namespace cc { | 9 namespace cc { |
8 | 10 |
9 LayerUpdater::Resource::Resource(scoped_ptr<PrioritizedResource> texture) | 11 LayerUpdater::Resource::Resource(scoped_ptr<PrioritizedResource> texture) |
10 : m_texture(texture.Pass()) | 12 : m_texture(texture.Pass()) { |
11 { | |
12 } | 13 } |
13 | 14 |
14 LayerUpdater::Resource::~Resource() | 15 void LayerUpdater::Resource::swapTextureWith( |
15 { | 16 scoped_ptr<PrioritizedResource>& texture) { |
| 17 m_texture.swap(texture); |
| 18 } |
| 19 |
| 20 LayerUpdater::Resource::~Resource() { |
16 } | 21 } |
17 | 22 |
18 } // namespace cc | 23 } // namespace cc |
OLD | NEW |