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

Unified Diff: ppapi/proxy/ppb_image_data_proxy.h

Issue 10880033: Don't overwrit image data case entries that are just marked usable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ppapi/proxy/ppb_graphics_2d_proxy.cc ('k') | ppapi/proxy/ppb_image_data_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_image_data_proxy.h
===================================================================
--- ppapi/proxy/ppb_image_data_proxy.h (revision 153070)
+++ ppapi/proxy/ppb_image_data_proxy.h (working copy)
@@ -62,9 +62,12 @@
const PP_ImageDataDesc& desc() const { return desc_; }
- // Fills the contents of the image with 0.
- void ZeroContents();
+ void set_used_in_replace_contents() { used_in_replace_contents_ = true; }
+ // Prepares this image data to be recycled to the plugin. The contents will be
+ // cleared if zero_contents is set.
+ void RecycleToPlugin(bool zero_contents);
+
#if !defined(OS_NACL)
static ImageHandle NullHandle();
static ImageHandle HandleFromInt(int32_t i);
@@ -84,6 +87,10 @@
scoped_ptr<skia::PlatformCanvas> mapped_canvas_;
#endif
+ // Set to true when this ImageData has been used in a call to
+ // Graphics2D.ReplaceContents. This is used to signal that it can be cached.
+ bool used_in_replace_contents_;
+
DISALLOW_COPY_AND_ASSIGN(ImageData);
};
« no previous file with comments | « ppapi/proxy/ppb_graphics_2d_proxy.cc ('k') | ppapi/proxy/ppb_image_data_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698