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

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

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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/pepper/pepper_graphics_2d_host.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 (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/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 766
767 void PepperPluginInstanceImpl::CommitBackingTexture() { 767 void PepperPluginInstanceImpl::CommitBackingTexture() {
768 if (!texture_layer_.get()) 768 if (!texture_layer_.get())
769 return; 769 return;
770 gpu::Mailbox mailbox; 770 gpu::Mailbox mailbox;
771 uint32 sync_point = 0; 771 uint32 sync_point = 0;
772 bound_graphics_3d_->GetBackingMailbox(&mailbox, &sync_point); 772 bound_graphics_3d_->GetBackingMailbox(&mailbox, &sync_point);
773 DCHECK(!mailbox.IsZero()); 773 DCHECK(!mailbox.IsZero());
774 DCHECK_NE(sync_point, 0u); 774 DCHECK_NE(sync_point, 0u);
775 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 775 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
776 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 776 cc::TextureMailbox(mailbox, gpu::SyncToken(sync_point), GL_TEXTURE_2D));
777 texture_layer_->SetNeedsDisplay(); 777 texture_layer_->SetNeedsDisplay();
778 } 778 }
779 779
780 void PepperPluginInstanceImpl::InstanceCrashed() { 780 void PepperPluginInstanceImpl::InstanceCrashed() {
781 // Force free all resources and vars. 781 // Force free all resources and vars.
782 HostGlobals::Get()->InstanceCrashed(pp_instance()); 782 HostGlobals::Get()->InstanceCrashed(pp_instance());
783 783
784 // Free any associated graphics. 784 // Free any associated graphics.
785 SetFullscreen(false); 785 SetFullscreen(false);
786 FlashSetFullscreen(false, false); 786 FlashSetFullscreen(false, false);
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 } 1998 }
1999 1999
2000 if (want_texture_layer) { 2000 if (want_texture_layer) {
2001 bool opaque = false; 2001 bool opaque = false;
2002 if (want_3d_layer) { 2002 if (want_3d_layer) {
2003 DCHECK(bound_graphics_3d_.get()); 2003 DCHECK(bound_graphics_3d_.get());
2004 texture_layer_ = cc::TextureLayer::CreateForMailbox( 2004 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2005 cc_blink::WebLayerImpl::LayerSettings(), NULL); 2005 cc_blink::WebLayerImpl::LayerSettings(), NULL);
2006 opaque = bound_graphics_3d_->IsOpaque(); 2006 opaque = bound_graphics_3d_->IsOpaque();
2007 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2007 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2008 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2008 cc::TextureMailbox(mailbox, gpu::SyncToken(sync_point),
2009 GL_TEXTURE_2D));
2009 } else { 2010 } else {
2010 DCHECK(bound_graphics_2d_platform_); 2011 DCHECK(bound_graphics_2d_platform_);
2011 texture_layer_ = cc::TextureLayer::CreateForMailbox( 2012 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2012 cc_blink::WebLayerImpl::LayerSettings(), this); 2013 cc_blink::WebLayerImpl::LayerSettings(), this);
2013 bound_graphics_2d_platform_->AttachedToNewLayer(); 2014 bound_graphics_2d_platform_->AttachedToNewLayer();
2014 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2015 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2015 texture_layer_->SetFlipped(false); 2016 texture_layer_->SetFlipped(false);
2016 } 2017 }
2017 2018
2018 // Ignore transparency in fullscreen, since that's what Flash always 2019 // Ignore transparency in fullscreen, since that's what Flash always
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 3278
3278 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3279 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3279 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3280 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3280 javascript_used_ = true; 3281 javascript_used_ = true;
3281 RenderThread::Get()->RecordAction( 3282 RenderThread::Get()->RecordAction(
3282 base::UserMetricsAction("Flash.JavaScriptUsed")); 3283 base::UserMetricsAction("Flash.JavaScriptUsed"));
3283 } 3284 }
3284 } 3285 }
3285 3286
3286 } // namespace content 3287 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_graphics_2d_host.cc ('k') | gpu/GLES2/gl2extchromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698