OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "sky/compositor/texture_cache.h" | 5 #include "sky/viewer/compositor/texture_cache.h" |
6 | 6 |
7 #include "mojo/converters/geometry/geometry_type_converters.h" | 7 #include "mojo/converters/geometry/geometry_type_converters.h" |
8 #include "mojo/gpu/gl_texture.h" | 8 #include "mojo/gpu/gl_texture.h" |
9 | 9 |
10 namespace sky { | 10 namespace sky { |
11 | 11 |
12 TextureCache::TextureCache() { | 12 TextureCache::TextureCache() { |
13 } | 13 } |
14 | 14 |
15 TextureCache::~TextureCache() { | 15 TextureCache::~TextureCache() { |
(...skipping 12 matching lines...) Expand all Loading... |
28 return texture.Pass(); | 28 return texture.Pass(); |
29 } | 29 } |
30 | 30 |
31 void TextureCache::PutTexture(scoped_ptr<mojo::GLTexture> texture) { | 31 void TextureCache::PutTexture(scoped_ptr<mojo::GLTexture> texture) { |
32 if (texture->size() != size_) | 32 if (texture->size() != size_) |
33 return; | 33 return; |
34 available_textures_.push_back(texture.release()); | 34 available_textures_.push_back(texture.release()); |
35 } | 35 } |
36 | 36 |
37 } // namespace sky | 37 } // namespace sky |
OLD | NEW |