summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-13 16:23:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-14 10:37:21 +0000
commit38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch)
treec4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc
parente684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff)
downloadqtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc')
-rw-r--r--chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc b/chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc
index 0fdd3dd61b2..8a56e382d36 100644
--- a/chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc
+++ b/chromium/third_party/blink/renderer/platform/graphics/bitmap_image.cc
@@ -99,7 +99,7 @@ void BitmapImage::NotifyMemoryChanged() {
size_t BitmapImage::TotalFrameBytes() {
if (cached_frame_)
- return Size().Area() * sizeof(ImageFrame::PixelData);
+ return static_cast<size_t>(Size().Area()) * sizeof(ImageFrame::PixelData);
return 0u;
}
@@ -182,8 +182,8 @@ Image::SizeAvailability BitmapImage::SetData(scoped_refptr<SharedBuffer> data,
// Return the image density in 0.01 "bits per pixel" rounded to the nearest
// integer.
-static inline int ImageDensityInCentiBpp(IntSize size,
- size_t image_size_bytes) {
+static inline uint64_t ImageDensityInCentiBpp(IntSize size,
+ size_t image_size_bytes) {
uint64_t image_area = static_cast<uint64_t>(size.Width()) * size.Height();
return (static_cast<uint64_t>(image_size_bytes) * 100 * 8 + image_area / 2) /
image_area;