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 GL_GLEXT_PROTOTYPES | 5 #ifndef GL_GLEXT_PROTOTYPES |
6 #define GL_GLEXT_PROTOTYPES | 6 #define GL_GLEXT_PROTOTYPES |
7 #endif | 7 #endif |
8 #include <GLES2/gl2extmojo.h> | 8 #include <GLES2/gl2extmojo.h> |
9 | 9 |
10 #include "mojo/gpu/gl_context.h" | 10 #include "mojo/gpu/gl_context.h" |
11 #include "mojo/gpu/gl_texture.h" | 11 #include "mojo/gpu/gl_texture.h" |
12 #include "mojo/gpu/texture_cache.h" | 12 #include "mojo/gpu/texture_cache.h" |
13 #include "mojo/services/geometry/public/interfaces/geometry.mojom.h" | 13 #include "mojo/services/geometry/interfaces/geometry.mojom.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 | 16 |
17 TextureCache::TextureInfo::TextureInfo() : texture_(), resource_id_(0u) { | 17 TextureCache::TextureInfo::TextureInfo() : texture_(), resource_id_(0u) { |
18 } | 18 } |
19 TextureCache::TextureInfo::TextureInfo(scoped_ptr<mojo::GLTexture> texture, | 19 TextureCache::TextureInfo::TextureInfo(scoped_ptr<mojo::GLTexture> texture, |
20 uint32_t resource_id) | 20 uint32_t resource_id) |
21 : texture_(texture.Pass()), resource_id_(resource_id) { | 21 : texture_(texture.Pass()), resource_id_(resource_id) { |
22 } | 22 } |
23 TextureCache::TextureInfo::~TextureInfo() { | 23 TextureCache::TextureInfo::~TextureInfo() { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 auto it = resource_to_texture_map_.find(resource->id); | 98 auto it = resource_to_texture_map_.find(resource->id); |
99 // Ignore the returned resource if we haven't been notified of its pending | 99 // Ignore the returned resource if we haven't been notified of its pending |
100 // return. | 100 // return. |
101 if (it != resource_to_texture_map_.end()) { | 101 if (it != resource_to_texture_map_.end()) { |
102 available_textures_.push_back(resource->id); | 102 available_textures_.push_back(resource->id); |
103 resource_to_sync_point_map_[resource->id] = resource->sync_point; | 103 resource_to_sync_point_map_[resource->id] = resource->sync_point; |
104 } | 104 } |
105 } | 105 } |
106 } | 106 } |
107 } // namespace mojo | 107 } // namespace mojo |
OLD | NEW |