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 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: releasecallback: SingleReleaseCallback Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | ui/compositor/layer.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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 web_layer_.reset(); 1834 web_layer_.reset();
1835 texture_layer_ = NULL; 1835 texture_layer_ = NULL;
1836 } 1836 }
1837 if (want_layer) { 1837 if (want_layer) {
1838 bool opaque = false; 1838 bool opaque = false;
1839 if (want_3d_layer) { 1839 if (want_3d_layer) {
1840 DCHECK(bound_graphics_3d_.get()); 1840 DCHECK(bound_graphics_3d_.get());
1841 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL); 1841 texture_layer_ = cc::TextureLayer::CreateForMailbox(NULL);
1842 opaque = bound_graphics_3d_->IsOpaque(); 1842 opaque = bound_graphics_3d_->IsOpaque();
1843 texture_layer_->SetTextureMailbox( 1843 texture_layer_->SetTextureMailbox(
1844 cc::TextureMailbox(mailbox, base::Bind(&IgnoreCallback), 0)); 1844 cc::TextureMailbox(mailbox, 0),
1845 cc::SingleReleaseCallback::Create(base::Bind(&IgnoreCallback)));
1845 } else { 1846 } else {
1846 DCHECK(bound_graphics_2d_platform_); 1847 DCHECK(bound_graphics_2d_platform_);
1847 texture_layer_ = cc::TextureLayer::CreateForMailbox(this); 1848 texture_layer_ = cc::TextureLayer::CreateForMailbox(this);
1848 bound_graphics_2d_platform_->AttachedToNewLayer(); 1849 bound_graphics_2d_platform_->AttachedToNewLayer();
1849 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque(); 1850 opaque = bound_graphics_2d_platform_->IsAlwaysOpaque();
1850 texture_layer_->SetFlipped(false); 1851 texture_layer_->SetFlipped(false);
1851 } 1852 }
1852 web_layer_.reset(new webkit::WebLayerImpl(texture_layer_)); 1853 web_layer_.reset(new webkit::WebLayerImpl(texture_layer_));
1853 if (fullscreen_container_) { 1854 if (fullscreen_container_) {
1854 fullscreen_container_->SetLayer(web_layer_.get()); 1855 fullscreen_container_->SetLayer(web_layer_.get());
(...skipping 13 matching lines...) Expand all
1868 unsigned PepperPluginInstanceImpl::PrepareTexture() { 1869 unsigned PepperPluginInstanceImpl::PrepareTexture() {
1869 return 0; 1870 return 0;
1870 } 1871 }
1871 1872
1872 WebKit::WebGraphicsContext3D* PepperPluginInstanceImpl::Context3d() { 1873 WebKit::WebGraphicsContext3D* PepperPluginInstanceImpl::Context3d() {
1873 return NULL; 1874 return NULL;
1874 } 1875 }
1875 1876
1876 bool PepperPluginInstanceImpl::PrepareTextureMailbox( 1877 bool PepperPluginInstanceImpl::PrepareTextureMailbox(
1877 cc::TextureMailbox* mailbox, 1878 cc::TextureMailbox* mailbox,
1879 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
1878 bool use_shared_memory) { 1880 bool use_shared_memory) {
1879 if (!bound_graphics_2d_platform_) 1881 if (!bound_graphics_2d_platform_)
1880 return false; 1882 return false;
1881 return bound_graphics_2d_platform_->PrepareTextureMailbox(mailbox); 1883 return bound_graphics_2d_platform_->PrepareTextureMailbox(
1884 mailbox, release_callback);
1882 } 1885 }
1883 1886
1884 void PepperPluginInstanceImpl::AddPluginObject(PluginObject* plugin_object) { 1887 void PepperPluginInstanceImpl::AddPluginObject(PluginObject* plugin_object) {
1885 DCHECK(live_plugin_objects_.find(plugin_object) == 1888 DCHECK(live_plugin_objects_.find(plugin_object) ==
1886 live_plugin_objects_.end()); 1889 live_plugin_objects_.end());
1887 live_plugin_objects_.insert(plugin_object); 1890 live_plugin_objects_.insert(plugin_object);
1888 } 1891 }
1889 1892
1890 void PepperPluginInstanceImpl::RemovePluginObject(PluginObject* plugin_object) { 1893 void PepperPluginInstanceImpl::RemovePluginObject(PluginObject* plugin_object) {
1891 // Don't actually verify that the object is in the set since during module 1894 // Don't actually verify that the object is in the set since during module
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 // Running out-of-process. Initiate an IPC call to notify the plugin 2967 // Running out-of-process. Initiate an IPC call to notify the plugin
2965 // process. 2968 // process.
2966 ppapi::proxy::HostDispatcher* dispatcher = 2969 ppapi::proxy::HostDispatcher* dispatcher =
2967 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); 2970 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
2968 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( 2971 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad(
2969 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); 2972 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data));
2970 } 2973 }
2971 } 2974 }
2972 2975
2973 } // namespace content 2976 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698