summaryrefslogtreecommitdiffstats
path: root/ui/snapshot
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-08 05:12:59 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-08 05:12:59 +0000
commit18d7de1508fda349cf0cc88bb5e5d200f6c238bd (patch)
tree4d4454935d03240446e32bd80e8cd26beca487ca /ui/snapshot
parent19bba6b36c647b94e7cbc22b83bee30ce636712f (diff)
downloadchromium_src-18d7de1508fda349cf0cc88bb5e5d200f6c238bd.zip
chromium_src-18d7de1508fda349cf0cc88bb5e5d200f6c238bd.tar.gz
chromium_src-18d7de1508fda349cf0cc88bb5e5d200f6c238bd.tar.bz2
Fix aura Win64 compilation error
Make a checked_numeric_cast to fix a c4267 warning. TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/15774023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/snapshot')
-rw-r--r--ui/snapshot/snapshot_aura.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc
index 32b1340..29daf9f 100644
--- a/ui/snapshot/snapshot_aura.cc
+++ b/ui/snapshot/snapshot_aura.cc
@@ -5,6 +5,7 @@
#include "ui/snapshot/snapshot.h"
#include "base/logging.h"
+#include "base/safe_numerics.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "ui/aura/root_window.h"
@@ -80,8 +81,8 @@ bool GrabWindowSnapshot(gfx::NativeWindow window,
bitmap.pixelRef()->pixels());
gfx::PNGCodec::Encode(pixels, gfx::PNGCodec::FORMAT_BGRA,
gfx::Size(bitmap.width(), bitmap.height()),
- bitmap.rowBytes(), true,
- std::vector<gfx::PNGCodec::Comment>(),
+ base::checked_numeric_cast<int>(bitmap.rowBytes()),
+ true, std::vector<gfx::PNGCodec::Comment>(),
png_representation);
return true;
}