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

Unified Diff: cc/output/software_frame_data.h

Issue 196423027: Move SoftwareFrameData overflow checks to the IPC code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: softwareframesize: Created 6 years, 9 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 | « no previous file | cc/output/software_frame_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/software_frame_data.h
diff --git a/cc/output/software_frame_data.h b/cc/output/software_frame_data.h
index b7fb44a4e818c028b637e034a0e5ff90b5381cf7..8463f808c8678183a9eaab670b220c36e783cd4d 100644
--- a/cc/output/software_frame_data.h
+++ b/cc/output/software_frame_data.h
@@ -6,6 +6,7 @@
#define CC_OUTPUT_SOFTWARE_FRAME_DATA_H_
#include "base/memory/shared_memory.h"
+#include "base/numerics/safe_math.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/rect.h"
@@ -20,6 +21,9 @@ class CC_EXPORT SoftwareFrameData {
gfx::Size size;
gfx::Rect damage_rect;
base::SharedMemoryHandle handle;
+
+ size_t SizeInBytes() const;
+ base::CheckedNumeric<size_t> CheckedSizeInBytes() const;
};
} // namespace cc
« no previous file with comments | « no previous file | cc/output/software_frame_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698