| 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 22 matching lines...) Expand all Loading... |
| 33 const gfx::Rect& rect) override; | 33 const gfx::Rect& rect) override; |
| 34 void WillUseTexImage() override; | 34 void WillUseTexImage() override; |
| 35 void DidUseTexImage() override {} | 35 void DidUseTexImage() override {} |
| 36 void WillModifyTexImage() override {} | 36 void WillModifyTexImage() override {} |
| 37 void DidModifyTexImage() override {} | 37 void DidModifyTexImage() override {} |
| 38 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 38 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 39 int z_order, | 39 int z_order, |
| 40 gfx::OverlayTransform transform, | 40 gfx::OverlayTransform transform, |
| 41 const gfx::Rect& bounds_rect, | 41 const gfx::Rect& bounds_rect, |
| 42 const gfx::RectF& crop_rect) override; | 42 const gfx::RectF& crop_rect) override; |
| 43 void DumpMemory(base::trace_event::ProcessMemoryDump* pmd, |
| 44 uint64_t process_tracing_id, |
| 45 const std::string& dump_name) override; |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 ~GLImageImpl() override; | 48 ~GLImageImpl() override; |
| 46 | 49 |
| 47 scoped_refptr<gfx::SurfaceTexture> surface_texture_; | 50 scoped_refptr<gfx::SurfaceTexture> surface_texture_; |
| 48 base::Closure release_callback_; | 51 base::Closure release_callback_; |
| 49 | 52 |
| 50 DISALLOW_COPY_AND_ASSIGN(GLImageImpl); | 53 DISALLOW_COPY_AND_ASSIGN(GLImageImpl); |
| 51 }; | 54 }; |
| 52 | 55 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 95 |
| 93 bool GLImageImpl::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 96 bool GLImageImpl::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 94 int z_order, | 97 int z_order, |
| 95 gfx::OverlayTransform transform, | 98 gfx::OverlayTransform transform, |
| 96 const gfx::Rect& bounds_rect, | 99 const gfx::Rect& bounds_rect, |
| 97 const gfx::RectF& crop_rect) { | 100 const gfx::RectF& crop_rect) { |
| 98 NOTREACHED(); | 101 NOTREACHED(); |
| 99 return false; | 102 return false; |
| 100 } | 103 } |
| 101 | 104 |
| 105 void GLImageImpl::DumpMemory(base::trace_event::ProcessMemoryDump* pmd, |
| 106 uint64_t process_tracing_id, |
| 107 const std::string& dump_name) { |
| 108 // TODO(ericrk): Implement GLImage DumpMemory. crbug.com/514914 |
| 109 } |
| 110 |
| 102 } // anonymous namespace | 111 } // anonymous namespace |
| 103 | 112 |
| 104 StreamTextureManagerInProcess::StreamTextureManagerInProcess() | 113 StreamTextureManagerInProcess::StreamTextureManagerInProcess() |
| 105 : next_id_(1), weak_factory_(this) {} | 114 : next_id_(1), weak_factory_(this) {} |
| 106 | 115 |
| 107 StreamTextureManagerInProcess::~StreamTextureManagerInProcess() { | 116 StreamTextureManagerInProcess::~StreamTextureManagerInProcess() { |
| 108 if (!textures_.empty()) { | 117 if (!textures_.empty()) { |
| 109 LOG(WARNING) << "Undestroyed surface textures while tearing down " | 118 LOG(WARNING) << "Undestroyed surface textures while tearing down " |
| 110 "StreamTextureManager."; | 119 "StreamTextureManager."; |
| 111 } | 120 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { | 172 StreamTextureManagerInProcess::GetSurfaceTexture(uint32 stream_id) { |
| 164 base::AutoLock lock(map_lock_); | 173 base::AutoLock lock(map_lock_); |
| 165 TextureMap::const_iterator it = textures_.find(stream_id); | 174 TextureMap::const_iterator it = textures_.find(stream_id); |
| 166 if (it != textures_.end()) | 175 if (it != textures_.end()) |
| 167 return it->second; | 176 return it->second; |
| 168 | 177 |
| 169 return NULL; | 178 return NULL; |
| 170 } | 179 } |
| 171 | 180 |
| 172 } // namespace gpu | 181 } // namespace gpu |
| OLD | NEW |