| 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/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 unsigned GetInternalFormat() override; | 30 unsigned GetInternalFormat() override; |
| 31 bool BindTexImage(unsigned target) override; | 31 bool BindTexImage(unsigned target) override; |
| 32 void ReleaseTexImage(unsigned target) override; | 32 void ReleaseTexImage(unsigned target) override; |
| 33 bool CopyTexImage(unsigned target) override; | 33 bool CopyTexImage(unsigned target) override; |
| 34 bool CopyTexSubImage(unsigned target, | 34 bool CopyTexSubImage(unsigned target, |
| 35 const gfx::Point& offset, | 35 const gfx::Point& offset, |
| 36 const gfx::Rect& rect) override; | 36 const gfx::Rect& rect) override; |
| 37 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 37 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 38 int z_order, | 38 int z_order, |
| 39 gfx::OverlayTransform transform, | 39 gfx::OverlayTransform transform, |
| 40 gfx::BufferFormat storage_format, |
| 40 const gfx::Rect& bounds_rect, | 41 const gfx::Rect& bounds_rect, |
| 41 const gfx::RectF& crop_rect) override; | 42 const gfx::RectF& crop_rect, |
| 43 bool handle_scaling) override; |
| 42 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 44 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 43 uint64_t process_tracing_id, | 45 uint64_t process_tracing_id, |
| 44 const std::string& dump_name) override; | 46 const std::string& dump_name) override; |
| 45 | 47 |
| 46 private: | 48 private: |
| 47 ~GLImageImpl() override; | 49 ~GLImageImpl() override; |
| 48 | 50 |
| 49 uint32 texture_id_; | 51 uint32 texture_id_; |
| 50 gles2::TextureManager* texture_manager_; | 52 gles2::TextureManager* texture_manager_; |
| 51 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 53 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 120 |
| 119 bool GLImageImpl::CopyTexSubImage(unsigned target, | 121 bool GLImageImpl::CopyTexSubImage(unsigned target, |
| 120 const gfx::Point& offset, | 122 const gfx::Point& offset, |
| 121 const gfx::Rect& rect) { | 123 const gfx::Rect& rect) { |
| 122 return false; | 124 return false; |
| 123 } | 125 } |
| 124 | 126 |
| 125 bool GLImageImpl::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 127 bool GLImageImpl::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 126 int z_order, | 128 int z_order, |
| 127 gfx::OverlayTransform transform, | 129 gfx::OverlayTransform transform, |
| 130 gfx::BufferFormat storage_format, |
| 128 const gfx::Rect& bounds_rect, | 131 const gfx::Rect& bounds_rect, |
| 129 const gfx::RectF& crop_rect) { | 132 const gfx::RectF& crop_rect, |
| 133 bool handle_scaling) { |
| 130 NOTREACHED(); | 134 NOTREACHED(); |
| 131 return false; | 135 return false; |
| 132 } | 136 } |
| 133 | 137 |
| 134 void GLImageImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 138 void GLImageImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 135 uint64_t process_tracing_id, | 139 uint64_t process_tracing_id, |
| 136 const std::string& dump_name) { | 140 const std::string& dump_name) { |
| 137 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 | 141 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 |
| 138 } | 142 } |
| 139 | 143 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { | 206 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { |
| 203 base::AutoLock lock(map_lock_); | 207 base::AutoLock lock(map_lock_); |
| 204 TextureMap::const_iterator it = textures_.find(stream_id); | 208 TextureMap::const_iterator it = textures_.find(stream_id); |
| 205 if (it != textures_.end()) | 209 if (it != textures_.end()) |
| 206 return it->second; | 210 return it->second; |
| 207 | 211 |
| 208 return NULL; | 212 return NULL; |
| 209 } | 213 } |
| 210 | 214 |
| 211 } // namespace gpu | 215 } // namespace gpu |
| OLD | NEW |