summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-25 21:54:49 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-25 21:54:49 +0000
commit16b7b2781d20602e7b58eaaf23a3c6e6ac250a55 (patch)
treeced69d77194024d772e513a8d149e1a18cadcde6 /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
parent16c10d7db132e781e6db49c26724006d06a54a35 (diff)
downloadchromium_src-16b7b2781d20602e7b58eaaf23a3c6e6ac250a55.zip
chromium_src-16b7b2781d20602e7b58eaaf23a3c6e6ac250a55.tar.gz
chromium_src-16b7b2781d20602e7b58eaaf23a3c6e6ac250a55.tar.bz2
PPAPI/NaCl: Make ImageData for NaCl just use shared memory
BUG=116317 TEST= TBR=ben@chromium.org ben for ui/gfx OWNERS Review URL: https://chromiumcodereview.appspot.com/10790063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148427 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.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index 6e4d3a8..c1d3829 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -195,7 +195,8 @@ PP_Resource PPB_Graphics2D_Impl::Create(PP_Instance instance,
bool PPB_Graphics2D_Impl::Init(int width, int height, bool is_always_opaque) {
// The underlying PPB_ImageData_Impl will validate the dimensions.
- image_data_ = new PPB_ImageData_Impl(pp_instance());
+ image_data_ = new PPB_ImageData_Impl(pp_instance(),
+ PPB_ImageData_Impl::PLATFORM);
if (!image_data_->Init(PPB_ImageData_Impl::GetNativeImageDataFormat(),
width, height, true) ||
!image_data_->Map()) {
@@ -452,7 +453,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();
+ SkCanvas* dest_canvas = image_resource->GetCanvas();
// We want to replace the contents of the bitmap rather than blend.
SkPaint paint;
@@ -681,7 +682,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();
+ SkCanvas* backing_canvas = image_data_->GetCanvas();
// We want to replace the contents of the bitmap rather than blend.
SkPaint paint;
@@ -694,7 +695,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_->GetCanvas(),
clip, gfx::Point(dx, dy));
*invalidated_rect = clip;
}