OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/media/android/stream_texture_factory.h" | 5 #include "content/renderer/media/android/stream_texture_factory.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "cc/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
10 #include "gpu/command_buffer/client/gles2_interface.h" | 10 #include "gpu/command_buffer/client/gles2_interface.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void StreamTextureProxy::BindOnThread() { | 61 void StreamTextureProxy::BindOnThread() { |
62 host_->BindToCurrentThread(this); | 62 host_->BindToCurrentThread(this); |
63 } | 63 } |
64 | 64 |
65 void StreamTextureProxy::OnFrameAvailable() { | 65 void StreamTextureProxy::OnFrameAvailable() { |
66 base::AutoLock lock(lock_); | 66 base::AutoLock lock(lock_); |
67 if (!received_frame_cb_.is_null()) | 67 if (!received_frame_cb_.is_null()) |
68 received_frame_cb_.Run(); | 68 received_frame_cb_.Run(); |
69 } | 69 } |
70 | 70 |
71 void StreamTextureProxy::EstablishPeer(int player_id, int frame_id) { | |
72 host_->EstablishPeer(player_id, frame_id); | |
73 } | |
74 | |
75 void StreamTextureProxy::SetStreamTextureSize(const gfx::Size& size) { | 71 void StreamTextureProxy::SetStreamTextureSize(const gfx::Size& size) { |
76 host_->SetStreamTextureSize(size); | 72 host_->SetStreamTextureSize(size); |
77 } | 73 } |
78 | 74 |
79 void StreamTextureProxy::ForwardStreamTextureForSurfaceRequest( | 75 void StreamTextureProxy::ForwardStreamTextureForSurfaceRequest( |
80 const base::UnguessableToken& request_token) { | 76 const base::UnguessableToken& request_token) { |
81 host_->ForwardStreamTextureForSurfaceRequest(request_token); | 77 host_->ForwardStreamTextureForSurfaceRequest(request_token); |
82 } | 78 } |
83 | 79 |
84 // static | 80 // static |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 texture_mailbox->name); | 126 texture_mailbox->name); |
131 } | 127 } |
132 return route_id; | 128 return route_id; |
133 } | 129 } |
134 | 130 |
135 gpu::gles2::GLES2Interface* StreamTextureFactory::ContextGL() { | 131 gpu::gles2::GLES2Interface* StreamTextureFactory::ContextGL() { |
136 return context_provider_->ContextGL(); | 132 return context_provider_->ContextGL(); |
137 } | 133 } |
138 | 134 |
139 } // namespace content | 135 } // namespace content |
OLD | NEW |