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

Side by Side Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 7860028: Retry 3 to split WebGraphicsContext3DCommandBufferImpl::initialize() into two stages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fold thread fixes into this patch. Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_plugin_delegate_impl.h" 5 #include "content/renderer/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 PepperPluginDelegateImpl::CreateContext3D() { 894 PepperPluginDelegateImpl::CreateContext3D() {
895 #ifdef ENABLE_GPU 895 #ifdef ENABLE_GPU
896 // If accelerated compositing of plugins is disabled, fail to create a 3D 896 // If accelerated compositing of plugins is disabled, fail to create a 3D
897 // context, because it won't be visible. This allows graceful fallback in the 897 // context, because it won't be visible. This allows graceful fallback in the
898 // modules. 898 // modules.
899 if (!render_view_->webkit_preferences().accelerated_plugins_enabled) 899 if (!render_view_->webkit_preferences().accelerated_plugins_enabled)
900 return NULL; 900 return NULL;
901 WebGraphicsContext3DCommandBufferImpl* context = 901 WebGraphicsContext3DCommandBufferImpl* context =
902 static_cast<WebGraphicsContext3DCommandBufferImpl*>( 902 static_cast<WebGraphicsContext3DCommandBufferImpl*>(
903 render_view_->webview()->graphicsContext3D()); 903 render_view_->webview()->graphicsContext3D());
904 if (!context || context->isContextLost()) 904 if (!context)
905 return NULL;
906 if (!context->makeContextCurrent() || context->isContextLost())
905 return NULL; 907 return NULL;
906 908
907 RendererGLContext* parent_context = context->context(); 909 RendererGLContext* parent_context = context->context();
908 if (!parent_context) 910 if (!parent_context)
909 return NULL; 911 return NULL;
910 912
911 return new PlatformContext3DImpl(parent_context); 913 return new PlatformContext3DImpl(parent_context);
912 #else 914 #else
913 return NULL; 915 return NULL;
914 #endif 916 #endif
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 1478
1477 int PepperPluginDelegateImpl::GetRoutingId() const { 1479 int PepperPluginDelegateImpl::GetRoutingId() const {
1478 return render_view_->routing_id(); 1480 return render_view_->routing_id();
1479 } 1481 }
1480 1482
1481 void PepperPluginDelegateImpl::PublishInitialPolicy( 1483 void PepperPluginDelegateImpl::PublishInitialPolicy(
1482 scoped_refptr<webkit::ppapi::PluginInstance> instance, 1484 scoped_refptr<webkit::ppapi::PluginInstance> instance,
1483 const std::string& policy) { 1485 const std::string& policy) {
1484 instance->HandlePolicyUpdate(policy); 1486 instance->HandlePolicyUpdate(policy);
1485 } 1487 }
OLDNEW
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698