OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/common/gpu/stream_texture_android.h" | 5 #include "content/common/gpu/stream_texture_android.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/stringize_macros.h" | 10 #include "base/strings/stringize_macros.h" |
11 #include "content/common/android/surface_texture_peer.h" | |
12 #include "content/common/gpu/gpu_channel.h" | 11 #include "content/common/gpu/gpu_channel.h" |
13 #include "content/common/gpu/gpu_messages.h" | 12 #include "content/common/gpu/gpu_messages.h" |
14 #include "gpu/command_buffer/service/context_group.h" | 13 #include "gpu/command_buffer/service/context_group.h" |
15 #include "gpu/command_buffer/service/context_state.h" | 14 #include "gpu/command_buffer/service/context_state.h" |
16 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
17 #include "gpu/command_buffer/service/texture_manager.h" | 16 #include "gpu/command_buffer/service/texture_manager.h" |
| 17 #include "gpu/ipc/common/android/surface_texture_peer.h" |
18 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
19 #include "ui/gl/gl_context.h" | 19 #include "ui/gl/gl_context.h" |
20 #include "ui/gl/gl_helper.h" | 20 #include "ui/gl/gl_helper.h" |
21 #include "ui/gl/scoped_binders.h" | 21 #include "ui/gl/scoped_binders.h" |
22 #include "ui/gl/scoped_make_current.h" | 22 #include "ui/gl/scoped_make_current.h" |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 using gpu::gles2::ContextGroup; | 26 using gpu::gles2::ContextGroup; |
27 using gpu::gles2::GLES2Decoder; | 27 using gpu::gles2::GLES2Decoder; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 DCHECK(!has_listener_); | 247 DCHECK(!has_listener_); |
248 has_listener_ = true; | 248 has_listener_ = true; |
249 } | 249 } |
250 | 250 |
251 void StreamTexture::OnEstablishPeer(int32_t primary_id, int32_t secondary_id) { | 251 void StreamTexture::OnEstablishPeer(int32_t primary_id, int32_t secondary_id) { |
252 if (!owner_stub_) | 252 if (!owner_stub_) |
253 return; | 253 return; |
254 | 254 |
255 base::ProcessHandle process = owner_stub_->channel()->GetClientPID(); | 255 base::ProcessHandle process = owner_stub_->channel()->GetClientPID(); |
256 | 256 |
257 SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer( | 257 gpu::SurfaceTexturePeer::GetInstance()->EstablishSurfaceTexturePeer( |
258 process, surface_texture_, primary_id, secondary_id); | 258 process, surface_texture_, primary_id, secondary_id); |
259 } | 259 } |
260 | 260 |
261 bool StreamTexture::BindTexImage(unsigned target) { | 261 bool StreamTexture::BindTexImage(unsigned target) { |
262 NOTREACHED(); | 262 NOTREACHED(); |
263 return false; | 263 return false; |
264 } | 264 } |
265 | 265 |
266 void StreamTexture::ReleaseTexImage(unsigned target) { | 266 void StreamTexture::ReleaseTexImage(unsigned target) { |
267 NOTREACHED(); | 267 NOTREACHED(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 return false; | 369 return false; |
370 } | 370 } |
371 | 371 |
372 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 372 void StreamTexture::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
373 uint64_t process_tracing_id, | 373 uint64_t process_tracing_id, |
374 const std::string& dump_name) { | 374 const std::string& dump_name) { |
375 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 | 375 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 |
376 } | 376 } |
377 | 377 |
378 } // namespace content | 378 } // namespace content |
OLD | NEW |