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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

Issue 10928241: Merge 155478 - Fix SafeAdd and SafeMultiply (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 years, 3 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 | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
===================================================================
--- gpu/command_buffer/service/texture_manager.cc (revision 157199)
+++ gpu/command_buffer/service/texture_manager.cc (working copy)
@@ -331,10 +331,10 @@
if (level >= 0 && face_index < level_infos_.size() &&
static_cast<size_t>(level) < level_infos_[face_index].size()) {
const LevelInfo& info = level_infos_[GLTargetToFaceIndex(face)][level];
- GLint right;
- GLint top;
- return SafeAdd(xoffset, width, &right) &&
- SafeAdd(yoffset, height, &top) &&
+ int32 right;
+ int32 top;
+ return SafeAddInt32(xoffset, width, &right) &&
+ SafeAddInt32(yoffset, height, &top) &&
xoffset >= 0 &&
yoffset >= 0 &&
right <= info.width &&
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698