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

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: Folded sync_point into sync_tokens 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
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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 } 1997 }
1998 1998
1999 if (want_texture_layer) { 1999 if (want_texture_layer) {
2000 bool opaque = false; 2000 bool opaque = false;
2001 if (want_3d_layer) { 2001 if (want_3d_layer) {
2002 DCHECK(bound_graphics_3d_.get()); 2002 DCHECK(bound_graphics_3d_.get());
2003 texture_layer_ = cc::TextureLayer::CreateForMailbox( 2003 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2004 cc_blink::WebLayerImpl::LayerSettings(), NULL); 2004 cc_blink::WebLayerImpl::LayerSettings(), NULL);
2005 opaque = bound_graphics_3d_->IsOpaque(); 2005 opaque = bound_graphics_3d_->IsOpaque();
2006 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2006 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2007 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2007 cc::TextureMailbox(mailbox, gpu::SyncToken(sync_point),
2008 GL_TEXTURE_2D));
2008 } else { 2009 } else {
2009 DCHECK(bound_graphics_2d_platform_); 2010 DCHECK(bound_graphics_2d_platform_);
2010 texture_layer_ = cc::TextureLayer::CreateForMailbox( 2011 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2011 cc_blink::WebLayerImpl::LayerSettings(), this); 2012 cc_blink::WebLayerImpl::LayerSettings(), this);
2012 bound_graphics_2d_platform_->AttachedToNewLayer(); 2013 bound_graphics_2d_platform_->AttachedToNewLayer();
2013 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2014 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2014 texture_layer_->SetFlipped(false); 2015 texture_layer_->SetFlipped(false);
2015 } 2016 }
2016 2017
2017 // Ignore transparency in fullscreen, since that's what Flash always 2018 // Ignore transparency in fullscreen, since that's what Flash always
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3276 3277
3277 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3278 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3278 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3279 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3279 javascript_used_ = true; 3280 javascript_used_ = true;
3280 RenderThread::Get()->RecordAction( 3281 RenderThread::Get()->RecordAction(
3281 base::UserMetricsAction("Flash.JavaScriptUsed")); 3282 base::UserMetricsAction("Flash.JavaScriptUsed"));
3282 } 3283 }
3283 } 3284 }
3284 3285
3285 } // namespace content 3286 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698