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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 2610853005: Modify Copy{Sub}TextureCHROMIUM entry point to add level argument (Closed)
Patch Set: fix chromeos Created 3 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 | « components/exo/buffer.cc ('k') | gpu/GLES2/gl2extchromium.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 // Ensure the target of texture is set before copyTextureCHROMIUM, otherwise 600 // Ensure the target of texture is set before copyTextureCHROMIUM, otherwise
601 // an invalid texture target may be used for copy texture. 601 // an invalid texture target may be used for copy texture.
602 uint32_t src_texture = gl->CreateAndConsumeTextureCHROMIUM( 602 uint32_t src_texture = gl->CreateAndConsumeTextureCHROMIUM(
603 mailbox_holder.texture_target, mailbox_holder.mailbox.name); 603 mailbox_holder.texture_target, mailbox_holder.mailbox.name);
604 604
605 // Application itself needs to take care of setting the right flip_y 605 // Application itself needs to take care of setting the right flip_y
606 // value down to get the expected result. 606 // value down to get the expected result.
607 // flip_y==true means to reverse the video orientation while 607 // flip_y==true means to reverse the video orientation while
608 // flip_y==false means to keep the intrinsic orientation. 608 // flip_y==false means to keep the intrinsic orientation.
609 gl->CopyTextureCHROMIUM(src_texture, texture, internal_format, type, flip_y, 609 gl->CopyTextureCHROMIUM(src_texture, 0, texture, 0, internal_format, type,
610 premultiply_alpha, false); 610 flip_y, premultiply_alpha, false);
611 611
612 gl->DeleteTextures(1, &src_texture); 612 gl->DeleteTextures(1, &src_texture);
613 gl->Flush(); 613 gl->Flush();
614 614
615 SyncTokenClientImpl client(gl); 615 SyncTokenClientImpl client(gl);
616 video_frame->UpdateReleaseSyncToken(&client); 616 video_frame->UpdateReleaseSyncToken(&client);
617 return true; 617 return true;
618 } 618 }
619 619
620 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const { 620 bool WebMediaPlayerAndroid::hasSingleSecurityOrigin() const {
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 1319 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1320 switches::kDisableMediaSuspend)) { 1320 switches::kDisableMediaSuspend)) {
1321 return false; 1321 return false;
1322 } 1322 }
1323 1323
1324 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && 1324 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) &&
1325 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); 1325 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden();
1326 } 1326 }
1327 1327
1328 } // namespace content 1328 } // namespace content
OLDNEW
« no previous file with comments | « components/exo/buffer.cc ('k') | gpu/GLES2/gl2extchromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698