OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/client/gpu_video_decode_accelerator_host.h" | 5 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "content/common/gpu/client/gpu_channel_host.h" | 10 #include "content/common/gpu/client/gpu_channel_host.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed( | 139 void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed( |
140 int32 bitstream_buffer_id) { | 140 int32 bitstream_buffer_id) { |
141 DCHECK(CalledOnValidThread()); | 141 DCHECK(CalledOnValidThread()); |
142 if (client_) | 142 if (client_) |
143 client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id); | 143 client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id); |
144 } | 144 } |
145 | 145 |
146 void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer( | 146 void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer( |
147 uint32 num_requested_buffers, | 147 uint32 num_requested_buffers, |
148 const gfx::Size& buffer_size) { | 148 const gfx::Size& buffer_size, |
| 149 uint32 texture_target) { |
149 DCHECK(CalledOnValidThread()); | 150 DCHECK(CalledOnValidThread()); |
150 if (client_) | 151 if (client_) { |
151 client_->ProvidePictureBuffers(num_requested_buffers, buffer_size); | 152 client_->ProvidePictureBuffers( |
| 153 num_requested_buffers, buffer_size, texture_target); |
| 154 } |
152 } | 155 } |
153 | 156 |
154 void GpuVideoDecodeAcceleratorHost::OnDismissPictureBuffer( | 157 void GpuVideoDecodeAcceleratorHost::OnDismissPictureBuffer( |
155 int32 picture_buffer_id) { | 158 int32 picture_buffer_id) { |
156 DCHECK(CalledOnValidThread()); | 159 DCHECK(CalledOnValidThread()); |
157 if (client_) | 160 if (client_) |
158 client_->DismissPictureBuffer(picture_buffer_id); | 161 client_->DismissPictureBuffer(picture_buffer_id); |
159 } | 162 } |
160 | 163 |
161 void GpuVideoDecodeAcceleratorHost::OnPictureReady( | 164 void GpuVideoDecodeAcceleratorHost::OnPictureReady( |
(...skipping 17 matching lines...) Expand all Loading... |
179 client_->NotifyResetDone(); | 182 client_->NotifyResetDone(); |
180 } | 183 } |
181 | 184 |
182 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { | 185 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { |
183 DCHECK(CalledOnValidThread()); | 186 DCHECK(CalledOnValidThread()); |
184 if (!client_) | 187 if (!client_) |
185 return; | 188 return; |
186 client_->NotifyError( | 189 client_->NotifyError( |
187 static_cast<media::VideoDecodeAccelerator::Error>(error)); | 190 static_cast<media::VideoDecodeAccelerator::Error>(error)); |
188 } | 191 } |
OLD | NEW |