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 #ifndef SKY_COMPOSITOR_TEXTURE_CACHE_H_ | 5 #ifndef SKY_VIEWER_COMPOSITOR_TEXTURE_CACHE_H_ |
6 #define SKY_COMPOSITOR_TEXTURE_CACHE_H_ | 6 #define SKY_VIEWER_COMPOSITOR_TEXTURE_CACHE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 | 11 |
12 namespace mojo { | 12 namespace mojo { |
13 class GLTexture; | 13 class GLTexture; |
14 } | 14 } |
15 | 15 |
16 namespace sky { | 16 namespace sky { |
17 | 17 |
18 class TextureCache { | 18 class TextureCache { |
19 public: | 19 public: |
20 TextureCache(); | 20 TextureCache(); |
21 ~TextureCache(); | 21 ~TextureCache(); |
22 | 22 |
23 scoped_ptr<mojo::GLTexture> GetTexture(const gfx::Size& size); | 23 scoped_ptr<mojo::GLTexture> GetTexture(const gfx::Size& size); |
24 void PutTexture(scoped_ptr<mojo::GLTexture> texture); | 24 void PutTexture(scoped_ptr<mojo::GLTexture> texture); |
25 | 25 |
26 private: | 26 private: |
27 gfx::Size size_; | 27 gfx::Size size_; |
28 ScopedVector<mojo::GLTexture> available_textures_; | 28 ScopedVector<mojo::GLTexture> available_textures_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(TextureCache); | 30 DISALLOW_COPY_AND_ASSIGN(TextureCache); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace sky | 33 } // namespace sky |
34 | 34 |
35 #endif // SKY_COMPOSITOR_TEXTURE_CACHE_H_ | 35 #endif // SKY_VIEWER_COMPOSITOR_TEXTURE_CACHE_H_ |
OLD | NEW |