summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/resource_creation_impl.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 02:35:48 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 02:35:48 +0000
commitcd781859e94bc4cedb35371cf4d6d1e161e87a11 (patch)
tree568ca78f3ec265af5dae2b1f178fdc95604f0134 /webkit/plugins/ppapi/resource_creation_impl.cc
parentd38c1b0a6e3f4cfeb5a5700f00523c5364d49f27 (diff)
downloadchromium_src-cd781859e94bc4cedb35371cf4d6d1e161e87a11.zip
chromium_src-cd781859e94bc4cedb35371cf4d6d1e161e87a11.tar.gz
chromium_src-cd781859e94bc4cedb35371cf4d6d1e161e87a11.tar.bz2
Revert 118385 since this seems to break mac-debug build.
""" 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 TBR=ananta@chromium.org Review URL: https://chromiumcodereview.appspot.com/9150055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/resource_creation_impl.cc')
-rw-r--r--webkit/plugins/ppapi/resource_creation_impl.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc
index b1480a0..1f3943b 100644
--- a/webkit/plugins/ppapi/resource_creation_impl.cc
+++ b/webkit/plugins/ppapi/resource_creation_impl.cc
@@ -6,7 +6,6 @@
#include "ppapi/c/pp_size.h"
#include "ppapi/shared_impl/ppb_audio_config_shared.h"
-#include "ppapi/shared_impl/private/ppb_font_shared.h"
#include "ppapi/shared_impl/ppb_input_event_shared.h"
#include "ppapi/shared_impl/ppb_resource_array_shared.h"
#include "ppapi/shared_impl/var.h"
@@ -22,6 +21,7 @@
#include "webkit/plugins/ppapi/ppb_file_system_impl.h"
#include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
#include "webkit/plugins/ppapi/ppb_flash_net_connector_impl.h"
+#include "webkit/plugins/ppapi/ppb_font_impl.h"
#include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
#include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h"
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
@@ -35,7 +35,6 @@
#include "webkit/plugins/ppapi/ppb_video_decoder_impl.h"
#include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
#include "webkit/plugins/ppapi/ppb_websocket_impl.h"
-#include "webkit/plugins/ppapi/resource_helper.h"
using ppapi::InputEventData;
using ppapi::PPB_InputEvent_Shared;
@@ -143,12 +142,7 @@ PP_Resource ResourceCreationImpl::CreateFlashNetConnector(
PP_Resource ResourceCreationImpl::CreateFontObject(
PP_Instance instance,
const PP_FontDescription_Dev* description) {
- PluginInstance* plugin_instance =
- ResourceHelper::PPInstanceToPluginInstance(instance);
- if (!plugin_instance)
- return 0;
- return ::ppapi::PPB_Font_Shared::CreateAsImpl(
- instance, *description, plugin_instance->delegate()->GetPreferences());
+ return PPB_Font_Impl::Create(instance, *description);
}
PP_Resource ResourceCreationImpl::CreateGraphics2D(