| 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 MOJO_GPU_TEXTURE_CACHE_H_ | 5 #ifndef MOJO_GPU_TEXTURE_CACHE_H_ |
| 6 #define MOJO_GPU_TEXTURE_CACHE_H_ | 6 #define MOJO_GPU_TEXTURE_CACHE_H_ |
| 7 | 7 |
| 8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| 11 #include <map> | 11 #include <map> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
| 17 #include "mojo/services/surfaces/public/interfaces/surfaces.mojom.h" | 17 #include "mojo/services/surfaces/interfaces/surfaces.mojom.h" |
| 18 | 18 |
| 19 namespace mojo { | 19 namespace mojo { |
| 20 | 20 |
| 21 class GLContext; | 21 class GLContext; |
| 22 class GLTexture; | 22 class GLTexture; |
| 23 class Size; | 23 class Size; |
| 24 | 24 |
| 25 // Represents a cache of textures which can be drawn to and submitted to a | 25 // Represents a cache of textures which can be drawn to and submitted to a |
| 26 // surface. | 26 // surface. |
| 27 // Each |texture| in the cache has an associated |resource_id| which must be | 27 // Each |texture| in the cache has an associated |resource_id| which must be |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 std::map<uint32_t, scoped_ptr<mojo::GLTexture>> resource_to_texture_map_; | 72 std::map<uint32_t, scoped_ptr<mojo::GLTexture>> resource_to_texture_map_; |
| 73 std::map<uint32_t, GLuint> resource_to_sync_point_map_; | 73 std::map<uint32_t, GLuint> resource_to_sync_point_map_; |
| 74 uint32_t next_resource_id_; | 74 uint32_t next_resource_id_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(TextureCache); | 76 DISALLOW_COPY_AND_ASSIGN(TextureCache); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace mojo | 79 } // namespace mojo |
| 80 | 80 |
| 81 #endif // MOJO_GPU_TEXTURE_CACHE_H_ | 81 #endif // MOJO_GPU_TEXTURE_CACHE_H_ |
| OLD | NEW |