summaryrefslogtreecommitdiffstats
path: root/chrome/browser/thumbnails/content_analysis.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/thumbnails/content_analysis.cc')
-rw-r--r--chrome/browser/thumbnails/content_analysis.cc25
1 files changed, 14 insertions, 11 deletions
diff --git a/chrome/browser/thumbnails/content_analysis.cc b/chrome/browser/thumbnails/content_analysis.cc
index 86d28b8..c795b1f 100644
--- a/chrome/browser/thumbnails/content_analysis.cc
+++ b/chrome/browser/thumbnails/content_analysis.cc
@@ -4,6 +4,9 @@
#include "chrome/browser/thumbnails/content_analysis.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <cmath>
#include <deque>
@@ -318,7 +321,7 @@ void ApplyGaussianGradientMagnitudeFilter(SkBitmap* input_bitmap,
int bit_shift = 8 - static_cast<int>(
std::log10(static_cast<float>(smoothed_max)) / std::log10(2.0f));
for (int r = 0; r < image_size.height(); ++r) {
- uint8* row = input_bitmap->getAddr8(0, r);
+ uint8_t* row = input_bitmap->getAddr8(0, r);
for (int c = 0; c < image_size.width(); ++c, ++row) {
*row <<= bit_shift;
}
@@ -349,8 +352,8 @@ void ApplyGaussianGradientMagnitudeFilter(SkBitmap* input_bitmap,
unsigned grad_max = 0;
for (int r = 0; r < image_size.height(); ++r) {
- const uint8* grad_x_row = intermediate.getAddr8(0, r);
- const uint8* grad_y_row = intermediate2.getAddr8(0, r);
+ const uint8_t* grad_x_row = intermediate.getAddr8(0, r);
+ const uint8_t* grad_y_row = intermediate2.getAddr8(0, r);
for (int c = 0; c < image_size.width(); ++c) {
unsigned grad_x = grad_x_row[c];
unsigned grad_y = grad_y_row[c];
@@ -363,9 +366,9 @@ void ApplyGaussianGradientMagnitudeFilter(SkBitmap* input_bitmap,
bit_shift = static_cast<int>(
std::log10(static_cast<float>(grad_max)) / std::log10(2.0f)) - 7;
for (int r = 0; r < image_size.height(); ++r) {
- const uint8* grad_x_row = intermediate.getAddr8(0, r);
- const uint8* grad_y_row = intermediate2.getAddr8(0, r);
- uint8* target_row = input_bitmap->getAddr8(0, r);
+ const uint8_t* grad_x_row = intermediate.getAddr8(0, r);
+ const uint8_t* grad_y_row = intermediate2.getAddr8(0, r);
+ uint8_t* target_row = input_bitmap->getAddr8(0, r);
for (int c = 0; c < image_size.width(); ++c) {
unsigned grad_x = grad_x_row[c];
unsigned grad_y = grad_y_row[c];
@@ -398,7 +401,7 @@ void ExtractImageProfileInformation(const SkBitmap& input_bitmap,
for (int r = 0; r < area.height(); ++r) {
// Points to the first byte of the row in the rectangle.
- const uint8* image_row = input_bitmap.getAddr8(area.x(), r + area.y());
+ const uint8_t* image_row = input_bitmap.getAddr8(area.x(), r + area.y());
unsigned row_sum = 0;
for (int c = 0; c < area.width(); ++c, ++image_row) {
row_sum += *image_row;
@@ -686,10 +689,10 @@ SkBitmap ComputeDecimatedImage(const SkBitmap& bitmap,
for (int r = 0; r < bitmap.height(); ++r) {
if (!rows[r])
continue; // We can just skip this one.
- uint8* src_row =
- static_cast<uint8*>(bitmap.getPixels()) + r * bitmap.rowBytes();
- uint8* insertion_target = static_cast<uint8*>(target.getPixels()) +
- target_row * target.rowBytes();
+ uint8_t* src_row =
+ static_cast<uint8_t*>(bitmap.getPixels()) + r * bitmap.rowBytes();
+ uint8_t* insertion_target = static_cast<uint8_t*>(target.getPixels()) +
+ target_row * target.rowBytes();
int left_copy_pixel = -1;
for (int c = 0; c < bitmap.width(); ++c) {
if (left_copy_pixel < 0 && columns[c]) {