Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1550)

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 24152009: Allow rendering from non-stream GL_TEXTURE_EXTERNAL_OES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: eead63fe Rebase. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index fcf36bf4eb3a7521b73ef79a7e2af56e6ae8f2c5..403d2961cd3c6f60f76fd5f1a14218ebae758f34 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -103,15 +103,17 @@ void GpuVideoDecodeAcceleratorHost::AssignPictureBuffers(
// Rearrange data for IPC command.
std::vector<int32> buffer_ids;
std::vector<uint32> texture_ids;
- std::vector<gfx::Size> sizes;
for (uint32 i = 0; i < buffers.size(); i++) {
const media::PictureBuffer& buffer = buffers[i];
+ if (buffer.size() != picture_buffer_dimensions_) {
+ OnErrorNotification(INVALID_ARGUMENT);
+ return;
+ }
texture_ids.push_back(buffer.texture_id());
buffer_ids.push_back(buffer.id());
- sizes.push_back(buffer.size());
}
Send(new AcceleratedVideoDecoderMsg_AssignPictureBuffers(
- decoder_route_id_, buffer_ids, texture_ids, sizes));
+ decoder_route_id_, buffer_ids, texture_ids));
}
void GpuVideoDecodeAcceleratorHost::ReusePictureBuffer(
@@ -184,12 +186,13 @@ void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed(
void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer(
uint32 num_requested_buffers,
- const gfx::Size& buffer_size,
+ const gfx::Size& dimensions,
uint32 texture_target) {
DCHECK(CalledOnValidThread());
+ picture_buffer_dimensions_ = dimensions;
if (client_) {
client_->ProvidePictureBuffers(
- num_requested_buffers, buffer_size, texture_target);
+ num_requested_buffers, dimensions, texture_target);
}
}

Powered by Google App Engine
This is Rietveld 408576698