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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 texture_layer_->ClearClient(); 2042 texture_layer_->ClearClient();
2043 texture_layer_ = NULL; 2043 texture_layer_ = NULL;
2044 } 2044 }
2045 compositor_layer_ = NULL; 2045 compositor_layer_ = NULL;
2046 } 2046 }
2047 2047
2048 if (want_texture_layer) { 2048 if (want_texture_layer) {
2049 bool opaque = false; 2049 bool opaque = false;
2050 if (want_3d_layer) { 2050 if (want_3d_layer) {
2051 DCHECK(bound_graphics_3d_.get()); 2051 DCHECK(bound_graphics_3d_.get());
2052 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL); 2052 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2053 cc_blink::WebLayerImpl::LayerSettings(), NULL);
2053 opaque = bound_graphics_3d_->IsOpaque(); 2054 opaque = bound_graphics_3d_->IsOpaque();
2054 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2055 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2055 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2056 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point));
2056 } else { 2057 } else {
2057 DCHECK(bound_graphics_2d_platform_); 2058 DCHECK(bound_graphics_2d_platform_);
2058 texture_layer_ = cc::TextureLayer::CreateForMailbox(this); 2059 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2060 cc_blink::WebLayerImpl::LayerSettings(), this);
2059 bound_graphics_2d_platform_->AttachedToNewLayer(); 2061 bound_graphics_2d_platform_->AttachedToNewLayer();
2060 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2062 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2061 texture_layer_->SetFlipped(false); 2063 texture_layer_->SetFlipped(false);
2062 } 2064 }
2063 2065
2064 // Ignore transparency in fullscreen, since that's what Flash always 2066 // Ignore transparency in fullscreen, since that's what Flash always
2065 // wants to do, and that lets it not recreate a context if 2067 // wants to do, and that lets it not recreate a context if
2066 // wmode=transparent was specified. 2068 // wmode=transparent was specified.
2067 opaque = opaque || fullscreen_container_; 2069 opaque = opaque || fullscreen_container_;
2068 texture_layer_->SetContentsOpaque(opaque); 2070 texture_layer_->SetContentsOpaque(opaque);
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3349 3351
3350 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3352 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3351 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3353 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3352 javascript_used_ = true; 3354 javascript_used_ = true;
3353 RenderThread::Get()->RecordAction( 3355 RenderThread::Get()->RecordAction(
3354 base::UserMetricsAction("Flash.JavaScriptUsed")); 3356 base::UserMetricsAction("Flash.JavaScriptUsed"));
3355 } 3357 }
3356 } 3358 }
3357 3359
3358 } // namespace content 3360 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_compositor_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698