summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_graphics_2d_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/ppb_graphics_2d_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/ppb_graphics_2d_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_2d_impl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index ddfea5f..027e8eb 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -398,7 +398,7 @@ bool PPB_Graphics2D_Impl::ReadImageData(PP_Resource image,
// Convert the image data if the format does not match.
ConvertImageData(image_data_, src_irect, image_resource, dest_rect);
} else {
- skia::PlatformCanvas* dest_canvas = image_resource->GetPlatformCanvas();
+ skia::PlatformCanvas* dest_canvas = image_resource->mapped_canvas();
// We want to replace the contents of the bitmap rather than blend.
SkPaint paint;
@@ -583,7 +583,7 @@ void PPB_Graphics2D_Impl::ExecutePaintImageData(PPB_ImageData_Impl* image,
ConvertImageData(image, src_irect, image_data_, dest_rect);
} else {
// We're guaranteed to have a mapped canvas since we mapped it in Init().
- skia::PlatformCanvas* backing_canvas = image_data_->GetPlatformCanvas();
+ skia::PlatformCanvas* backing_canvas = image_data_->mapped_canvas();
// We want to replace the contents of the bitmap rather than blend.
SkPaint paint;
@@ -596,7 +596,7 @@ void PPB_Graphics2D_Impl::ExecutePaintImageData(PPB_ImageData_Impl* image,
void PPB_Graphics2D_Impl::ExecuteScroll(const gfx::Rect& clip,
int dx, int dy,
gfx::Rect* invalidated_rect) {
- gfx::ScrollCanvas(image_data_->GetPlatformCanvas(),
+ gfx::ScrollCanvas(image_data_->mapped_canvas(),
clip, gfx::Point(dx, dy));
*invalidated_rect = clip;
}