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

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: Re-work Android LayerSettings. 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 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 texture_layer_->ClearClient(); 2037 texture_layer_->ClearClient();
2038 texture_layer_ = NULL; 2038 texture_layer_ = NULL;
2039 } 2039 }
2040 compositor_layer_ = NULL; 2040 compositor_layer_ = NULL;
2041 } 2041 }
2042 2042
2043 if (want_texture_layer) { 2043 if (want_texture_layer) {
2044 bool opaque = false; 2044 bool opaque = false;
2045 if (want_3d_layer) { 2045 if (want_3d_layer) {
2046 DCHECK(bound_graphics_3d_.get()); 2046 DCHECK(bound_graphics_3d_.get());
2047 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL); 2047 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2048 cc_blink::WebLayerImpl::LayerSettings(), NULL);
2048 opaque = bound_graphics_3d_->IsOpaque(); 2049 opaque = bound_graphics_3d_->IsOpaque();
2049 texture_layer_->SetTextureMailboxWithoutReleaseCallback( 2050 texture_layer_->SetTextureMailboxWithoutReleaseCallback(
2050 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point)); 2051 cc::TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point));
2051 } else { 2052 } else {
2052 DCHECK(bound_graphics_2d_platform_); 2053 DCHECK(bound_graphics_2d_platform_);
2053 texture_layer_ = cc::TextureLayer::CreateForMailbox(this); 2054 texture_layer_ = cc::TextureLayer::CreateForMailbox(
2055 cc_blink::WebLayerImpl::LayerSettings(), this);
2054 bound_graphics_2d_platform_->AttachedToNewLayer(); 2056 bound_graphics_2d_platform_->AttachedToNewLayer();
2055 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 2057 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
2056 texture_layer_->SetFlipped(false); 2058 texture_layer_->SetFlipped(false);
2057 } 2059 }
2058 2060
2059 // Ignore transparency in fullscreen, since that's what Flash always 2061 // Ignore transparency in fullscreen, since that's what Flash always
2060 // wants to do, and that lets it not recreate a context if 2062 // wants to do, and that lets it not recreate a context if
2061 // wmode=transparent was specified. 2063 // wmode=transparent was specified.
2062 opaque = opaque || fullscreen_container_; 2064 opaque = opaque || fullscreen_container_;
2063 texture_layer_->SetContentsOpaque(opaque); 2065 texture_layer_->SetContentsOpaque(opaque);
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
3344 3346
3345 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() { 3347 void PepperPluginInstanceImpl::RecordFlashJavaScriptUse() {
3346 if (initialized_ && !javascript_used_ && is_flash_plugin_) { 3348 if (initialized_ && !javascript_used_ && is_flash_plugin_) {
3347 javascript_used_ = true; 3349 javascript_used_ = true;
3348 RenderThread::Get()->RecordAction( 3350 RenderThread::Get()->RecordAction(
3349 base::UserMetricsAction("Flash.JavaScriptUsed")); 3351 base::UserMetricsAction("Flash.JavaScriptUsed"));
3350 } 3352 }
3351 } 3353 }
3352 3354
3353 } // namespace content 3355 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698