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

Unified Diff: ppapi/cpp/image_data.h

Issue 519873002: Avoid OOB memcpy in chrome_pdf::CopyImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix underlying math bug. Created 6 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 | « pdf/draw_utils.cc ('k') | ppapi/cpp/image_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/image_data.h
diff --git a/ppapi/cpp/image_data.h b/ppapi/cpp/image_data.h
index e9366ceb41529cc23376762ce27ada3480a4d717..00bd0fd30738345f61f7c3233b9c882b7b8cb9e1 100644
--- a/ppapi/cpp/image_data.h
+++ b/ppapi/cpp/image_data.h
@@ -7,8 +7,9 @@
#include "ppapi/c/ppb_image_data.h"
#include "ppapi/cpp/point.h"
-#include "ppapi/cpp/size.h"
+#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/resource.h"
+#include "ppapi/cpp/size.h"
/// @file
/// This file defines the APIs for determining how a browser
@@ -129,6 +130,14 @@ class ImageData : public Resource {
/// @return The address for the pixel.
uint32_t* GetAddr32(const Point& coord);
+ /// This function determines if a rectangle's dimensions are fully contained
+ /// within the boundaries of the image.
+ ///
+ /// @param[in] rect A <code>Rect</code> representing the rectangle to check.
+ ///
+ /// @return True if fully contained, false otherwise.
+ bool Contains(const pp::Rect& rect) const;
raymes 2014/09/01 00:42:17 Technically this is a change to the public API. We
+
private:
void InitData();
« no previous file with comments | « pdf/draw_utils.cc ('k') | ppapi/cpp/image_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698