Chromium Code Reviews| 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/pepper/video_decoder_shim.h" | 5 #include "content/renderer/pepper/video_decoder_shim.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
| 10 | 10 |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 gles2->TexImage2D(GL_TEXTURE_2D, | 520 gles2->TexImage2D(GL_TEXTURE_2D, |
| 521 0, | 521 0, |
| 522 GL_RGBA, | 522 GL_RGBA, |
| 523 texture_size_.width(), | 523 texture_size_.width(), |
| 524 texture_size_.height(), | 524 texture_size_.height(), |
| 525 0, | 525 0, |
| 526 GL_RGBA, | 526 GL_RGBA, |
| 527 GL_UNSIGNED_BYTE, | 527 GL_UNSIGNED_BYTE, |
| 528 &frame->argb_pixels.front()); | 528 &frame->argb_pixels.front()); |
| 529 | 529 |
| 530 host_->PictureReady(media::Picture(texture_id, frame->decode_id)); | 530 host_->PictureReady(media::Picture(texture_id, frame->decode_id, |
| 531 texture_size_)); | |
|
Pawel Osciak
2014/08/10 00:02:21
We should be passing visible size here, not coded
kcwu
2014/08/12 04:48:06
I don't understand what you mean. texture_size_ he
Pawel Osciak
2014/08/12 04:59:24
OnOutputComplete gets a VF, which has both coded a
kcwu
2014/08/12 07:31:11
Ah, I was confused with VideoDecoderShim::DecoderI
| |
| 531 pending_frames_.pop(); | 532 pending_frames_.pop(); |
| 532 } | 533 } |
| 533 | 534 |
| 534 FlushCommandBuffer(); | 535 FlushCommandBuffer(); |
| 535 | 536 |
| 536 if (pending_frames_.empty()) { | 537 if (pending_frames_.empty()) { |
| 537 // If frames aren't backing up, notify the host of any completed decodes so | 538 // If frames aren't backing up, notify the host of any completed decodes so |
| 538 // it can send more buffers. | 539 // it can send more buffers. |
| 539 NotifyCompletedDecodes(); | 540 NotifyCompletedDecodes(); |
| 540 | 541 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { | 581 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { |
| 581 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); | 582 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); |
| 582 gles2->DeleteTextures(1, &texture_id); | 583 gles2->DeleteTextures(1, &texture_id); |
| 583 } | 584 } |
| 584 | 585 |
| 585 void VideoDecoderShim::FlushCommandBuffer() { | 586 void VideoDecoderShim::FlushCommandBuffer() { |
| 586 context_provider_->ContextGL()->Flush(); | 587 context_provider_->ContextGL()->Flush(); |
| 587 } | 588 } |
| 588 | 589 |
| 589 } // namespace content | 590 } // namespace content |
| OLD | NEW |