OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "gpu/command_buffer/service/stream_texture_manager_in_process_android.h
" | 5 #include "gpu/command_buffer/service/stream_texture_manager_in_process_android.h
" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "gpu/command_buffer/service/texture_manager.h" | 9 #include "gpu/command_buffer/service/texture_manager.h" |
10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 #include "ui/gl/android/surface_texture.h" | 11 #include "ui/gl/android/surface_texture.h" |
12 #include "ui/gl/gl_bindings.h" | 12 #include "ui/gl/gl_bindings.h" |
13 #include "ui/gl/gl_image.h" | 13 #include "ui/gl/gl_image.h" |
14 | 14 |
15 namespace gpu { | 15 namespace gpu { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Simply wraps a SurfaceTexture reference as a GLImage. | 19 // Simply wraps a SurfaceTexture reference as a GLImage. |
20 class GLImageImpl : public gfx::GLImage { | 20 class GLImageImpl : public gfx::GLImage { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { | 162 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { |
163 base::AutoLock lock(map_lock_); | 163 base::AutoLock lock(map_lock_); |
164 TextureMap::const_iterator it = textures_.find(stream_id); | 164 TextureMap::const_iterator it = textures_.find(stream_id); |
165 if (it != textures_.end()) | 165 if (it != textures_.end()) |
166 return it->second; | 166 return it->second; |
167 | 167 |
168 return NULL; | 168 return NULL; |
169 } | 169 } |
170 | 170 |
171 } // namespace gpu | 171 } // namespace gpu |
OLD | NEW |