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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/common/android/surface_texture_peer.h" | 8 #include "content/common/android/surface_texture_peer.h" |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 #include "content/common/gpu/gpu_messages.h" | 10 #include "content/common/gpu/gpu_messages.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if (has_listener_ && owner_stub_) { | 158 if (has_listener_ && owner_stub_) { |
159 owner_stub_->channel()->Send( | 159 owner_stub_->channel()->Send( |
160 new GpuStreamTextureMsg_FrameAvailable(route_id_)); | 160 new GpuStreamTextureMsg_FrameAvailable(route_id_)); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 gfx::Size StreamTexture::GetSize() { | 164 gfx::Size StreamTexture::GetSize() { |
165 return size_; | 165 return size_; |
166 } | 166 } |
167 | 167 |
| 168 unsigned StreamTexture::GetInternalFormat() { |
| 169 return GL_RGBA; |
| 170 } |
| 171 |
168 bool StreamTexture::OnMessageReceived(const IPC::Message& message) { | 172 bool StreamTexture::OnMessageReceived(const IPC::Message& message) { |
169 bool handled = true; | 173 bool handled = true; |
170 IPC_BEGIN_MESSAGE_MAP(StreamTexture, message) | 174 IPC_BEGIN_MESSAGE_MAP(StreamTexture, message) |
171 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_StartListening, OnStartListening) | 175 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_StartListening, OnStartListening) |
172 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_EstablishPeer, OnEstablishPeer) | 176 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_EstablishPeer, OnEstablishPeer) |
173 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_SetSize, OnSetSize) | 177 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_SetSize, OnSetSize) |
174 IPC_MESSAGE_UNHANDLED(handled = false) | 178 IPC_MESSAGE_UNHANDLED(handled = false) |
175 IPC_END_MESSAGE_MAP() | 179 IPC_END_MESSAGE_MAP() |
176 | 180 |
177 DCHECK(handled); | 181 DCHECK(handled); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 bool StreamTexture::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 213 bool StreamTexture::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
210 int z_order, | 214 int z_order, |
211 gfx::OverlayTransform transform, | 215 gfx::OverlayTransform transform, |
212 const gfx::Rect& bounds_rect, | 216 const gfx::Rect& bounds_rect, |
213 const gfx::RectF& crop_rect) { | 217 const gfx::RectF& crop_rect) { |
214 NOTREACHED(); | 218 NOTREACHED(); |
215 return false; | 219 return false; |
216 } | 220 } |
217 | 221 |
218 } // namespace content | 222 } // namespace content |
OLD | NEW |