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

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

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb LayerSettings parameter for cc::Layer construction. Created 5 years, 7 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
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/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 fullscreen_container_->SetLayer(NULL); 2032 fullscreen_container_->SetLayer(NULL);
2033 web_layer_.reset(); 2033 web_layer_.reset();
2034 texture_layer_ = NULL; 2034 texture_layer_ = NULL;
2035 compositor_layer_ = NULL; 2035 compositor_layer_ = NULL;
2036 } 2036 }
2037 2037
2038 if (want_texture_layer) { 2038 if (want_texture_layer) {
2039 bool opaque = false; 2039 bool opaque = false;
2040 if (want_3d_layer) { 2040 if (want_3d_layer) {
2041 DCHECK(bound_graphics_3d_.get()); 2041 DCHECK(bound_graphics_3d_.get());
2042 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL); 2042 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2043 cc_blink::WebLayerImpl::LayerSettings(), NULL);
2043 opaque = bound_graphics_3d_->IsOpaque(); 2044 opaque = bound_graphics_3d_->IsOpaque();
2044 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2045 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2045 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2046 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point));
2046 } else { 2047 } else {
2047 DCHECK(bound_graphics_2d_platform_); 2048 DCHECK(bound_graphics_2d_platform_);
2048 texture_layer_ = cc::TextureLayer::CreateForMailbox(this); 2049 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2050 cc_blink::WebLayerImpl::LayerSettings(), this);
2049 bound_graphics_2d_platform_->AttachedToNewLayer(); 2051 bound_graphics_2d_platform_->AttachedToNewLayer();
2050 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2052 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2051 texture_layer_->SetFlipped(false); 2053 texture_layer_->SetFlipped(false);
2052 } 2054 }
2053 2055
2054 // Ignore transparency in fullscreen, since that's what Flash always 2056 // Ignore transparency in fullscreen, since that's what Flash always
2055 // wants to do, and that lets it not recreate a context if 2057 // wants to do, and that lets it not recreate a context if
2056 // wmode=transparent was specified. 2058 // wmode=transparent was specified.
2057 opaque = opaque || fullscreen_container_; 2059 opaque = opaque || fullscreen_container_;
2058 texture_layer_->SetContentsOpaque(opaque); 2060 texture_layer_->SetContentsOpaque(opaque);
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
3342 3344
3343 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3345 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3344 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3346 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3345 javascript_used_ = true; 3347 javascript_used_ = true;
3346 RenderThread::Get()->RecordAction( 3348 RenderThread::Get()->RecordAction(
3347 base::UserMetricsAction("Flash.JavaScriptUsed")); 3349 base::UserMetricsAction("Flash.JavaScriptUsed"));
3348 } 3350 }
3349 } 3351 }
3350 3352
3351 } // namespace content 3353 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698