summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin/ppapi_thread.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 23:37:01 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 23:37:01 +0000
commitd914b2b089eb4255946aff2428f79f78739586a5 (patch)
tree98a9113121cb22921e0e82f4a4cdd5f9f6a049e1 /content/ppapi_plugin/ppapi_thread.cc
parentfbd57461041b0a7eb5d93ca4e057d11abb1e8b19 (diff)
downloadchromium_src-d914b2b089eb4255946aff2428f79f78739586a5.zip
chromium_src-d914b2b089eb4255946aff2428f79f78739586a5.tar.gz
chromium_src-d914b2b089eb4255946aff2428f79f78739586a5.tar.bz2
Remove the Webkit thread in the PPAPI plugin process and perform the text and font operations
on the PPAPI main thread. This thread is now registered as the Webkit thread. Fixes performance issues seen in Flapper with text and font operations. It appears that the perf issues occur due to context switching between the main thread and the webkit thread. As per comments from Brett moving the font forwarding code inline to ppb_font_shared.cc. This file has been moved to ppapi/shared_impl/private as it now brings in a dependency on WebKit. The font creation has been wired up to the ResourceCreationAPI as suggested. BUG=110190 R=brettw Review URL: https://chromiumcodereview.appspot.com/9133015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118385 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/ppapi_plugin/ppapi_thread.cc')
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index e989785..3277f1b 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -14,7 +14,7 @@
#include "content/common/child_process_messages.h"
#include "content/ppapi_plugin/broker_process_dispatcher.h"
#include "content/ppapi_plugin/plugin_process_dispatcher.h"
-#include "content/ppapi_plugin/ppapi_webkit_thread.h"
+#include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/sandbox_init.h"
#include "ipc/ipc_channel_handle.h"
@@ -25,7 +25,7 @@
#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/interface_list.h"
-#include "webkit/plugins/ppapi/webkit_forwarding_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#if defined(OS_WIN)
#include "sandbox/src/sandbox.h"
@@ -50,6 +50,8 @@ PpapiThread::PpapiThread(bool is_broker)
base::RandInt(0, std::numeric_limits<PP_Module>::max())),
next_plugin_dispatcher_id_(1) {
ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(this);
+ webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
+ WebKit::initialize(webkit_platform_support_.get());
}
PpapiThread::~PpapiThread() {
@@ -67,6 +69,7 @@ PpapiThread::~PpapiThread() {
library_.GetFunctionPointer("PPP_ShutdownModule"));
if (shutdown_function)
shutdown_function();
+ WebKit::shutdown();
}
// The "regular" ChildThread implements this function and does some standard
@@ -111,19 +114,6 @@ std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() {
return &globally_seen_instance_ids_;
}
-ppapi::WebKitForwarding* PpapiThread::GetWebKitForwarding() {
- if (!webkit_forwarding_.get())
- webkit_forwarding_.reset(new webkit::ppapi::WebKitForwardingImpl);
- return webkit_forwarding_.get();
-}
-
-void PpapiThread::PostToWebKitThread(const tracked_objects::Location& from_here,
- const base::Closure& task) {
- if (!webkit_thread_.get())
- webkit_thread_.reset(new PpapiWebKitThread);
- webkit_thread_->PostTask(from_here, task);
-}
-
bool PpapiThread::SendToBrowser(IPC::Message* msg) {
return Send(msg);
}