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