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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10796064: PPAPI/NaCl: Make nacl_ipc_adapter handle ImageData creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sketch of idea for extracting handles generally Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/blit.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 6fca59fb307f8cb779ec34396f5c5323f8311b24..b462ce1b9cccadc26f93537c1669992118156d09 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -853,6 +853,10 @@ bool PluginInstance::GetBitmapForOptimizedPluginPaint(
// store when seeing if we cover the given paint bounds, since the backing
// store could be smaller than the declared plugin area.
PPB_ImageData_Impl* image_data = GetBoundGraphics2D()->image_data();
+ // ImageDatas created by NaCl don't have a PlatformImage, so can't be
+ // optimized this way.
+ if (!image_data->PlatformImage())
+ return false;
gfx::Rect plugin_backing_store_rect(
PP_ToGfxPoint(view_data_.rect.point),
gfx::Size(image_data->width(), image_data->height()));
@@ -863,7 +867,7 @@ bool PluginInstance::GetBitmapForOptimizedPluginPaint(
if (!plugin_paint_rect.Contains(paint_bounds))
return false;
- *dib = image_data->platform_image()->GetTransportDIB();
+ *dib = image_data->PlatformImage()->GetTransportDIB();
*location = plugin_backing_store_rect;
*clip = clip_page;
return true;
« no previous file with comments | « ui/gfx/blit.cc ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698