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

Side by Side Diff: content/renderer/pepper/video_decoder_shim.cc

Issue 806413004: Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed v4l2 Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 gles2->TexImage2D(GL_TEXTURE_2D, 527 gles2->TexImage2D(GL_TEXTURE_2D,
528 0, 528 0,
529 GL_RGBA, 529 GL_RGBA,
530 texture_size_.width(), 530 texture_size_.width(),
531 texture_size_.height(), 531 texture_size_.height(),
532 0, 532 0,
533 GL_RGBA, 533 GL_RGBA,
534 GL_UNSIGNED_BYTE, 534 GL_UNSIGNED_BYTE,
535 &frame->argb_pixels.front()); 535 &frame->argb_pixels.front());
536 536
537 host_->PictureReady( 537 host_->PictureReady(media::Picture(texture_id, frame->decode_id,
538 media::Picture(texture_id, frame->decode_id, frame->visible_rect)); 538 frame->visible_rect, false));
539 pending_frames_.pop(); 539 pending_frames_.pop();
540 } 540 }
541 541
542 FlushCommandBuffer(); 542 FlushCommandBuffer();
543 543
544 if (pending_frames_.empty()) { 544 if (pending_frames_.empty()) {
545 // If frames aren't backing up, notify the host of any completed decodes so 545 // If frames aren't backing up, notify the host of any completed decodes so
546 // it can send more buffers. 546 // it can send more buffers.
547 NotifyCompletedDecodes(); 547 NotifyCompletedDecodes();
548 548
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { 588 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) {
589 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); 589 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL();
590 gles2->DeleteTextures(1, &texture_id); 590 gles2->DeleteTextures(1, &texture_id);
591 } 591 }
592 592
593 void VideoDecoderShim::FlushCommandBuffer() { 593 void VideoDecoderShim::FlushCommandBuffer() {
594 context_provider_->ContextGL()->Flush(); 594 context_provider_->ContextGL()->Flush();
595 } 595 }
596 596
597 } // namespace content 597 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698