summaryrefslogtreecommitdiffstats
path: root/base/gfx
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 15:01:12 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 15:01:12 +0000
commit52a261f59b20e89f8c5936bce642362f8e367b57 (patch)
treefcc7b3c100caaf43848cd9a241beafc883f93b7d /base/gfx
parent7d926f9072ac496db6df715cc6a6bd5d3f9bd011 (diff)
downloadchromium_src-52a261f59b20e89f8c5936bce642362f8e367b57.zip
chromium_src-52a261f59b20e89f8c5936bce642362f8e367b57.tar.gz
chromium_src-52a261f59b20e89f8c5936bce642362f8e367b57.tar.bz2
NO CODE CHANGE (except one global std::wstring changed to const wchar_t* const per style compliance).
Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx')
-rw-r--r--base/gfx/jpeg_codec.cc4
-rw-r--r--base/gfx/native_theme.cc17
-rw-r--r--base/gfx/png_codec_unittest.cc12
-rw-r--r--base/gfx/png_decoder.cc5
-rwxr-xr-xbase/gfx/png_encoder.cc3
5 files changed, 26 insertions, 15 deletions
diff --git a/base/gfx/jpeg_codec.cc b/base/gfx/jpeg_codec.cc
index cd82ff3..47055dc 100644
--- a/base/gfx/jpeg_codec.cc
+++ b/base/gfx/jpeg_codec.cc
@@ -44,7 +44,9 @@ namespace {
const static int initial_output_buffer_size = 8192;
struct JpegEncoderState {
- JpegEncoderState(std::vector<unsigned char>* o) : out(o), image_buffer_used(0) {
+ JpegEncoderState(std::vector<unsigned char>* o)
+ : out(o),
+ image_buffer_used(0) {
}
// Output buffer, of which 'image_buffer_used' bytes are actually used (this
diff --git a/base/gfx/native_theme.cc b/base/gfx/native_theme.cc
index 2faffd5..ff852c5 100644
--- a/base/gfx/native_theme.cc
+++ b/base/gfx/native_theme.cc
@@ -103,7 +103,7 @@ HRESULT NativeTheme::PaintButton(HDC hdc,
if (handle && get_theme_content_rect_) {
get_theme_content_rect_(handle, hdc, part_id, state_id, rect, rect);
} else {
- InflateRect(rect, -GetSystemMetrics(SM_CXEDGE),
+ InflateRect(rect, -GetSystemMetrics(SM_CXEDGE),
-GetSystemMetrics(SM_CYEDGE));
}
DrawFocusRect(hdc, rect);
@@ -193,13 +193,14 @@ HRESULT NativeTheme::PaintScrollbarArrow(HDC hdc,
return S_OK;
}
-HRESULT NativeTheme::PaintScrollbarTrack(HDC hdc,
- int part_id,
- int state_id,
- int classic_state,
- RECT* target_rect,
- RECT* align_rect,
- skia::PlatformCanvasWin* canvas) const {
+HRESULT NativeTheme::PaintScrollbarTrack(
+ HDC hdc,
+ int part_id,
+ int state_id,
+ int classic_state,
+ RECT* target_rect,
+ RECT* align_rect,
+ skia::PlatformCanvasWin* canvas) const {
HANDLE handle = GetThemeHandle(SCROLLBAR);
if (handle && draw_theme_)
return draw_theme_(handle, hdc, part_id, state_id, target_rect, NULL);
diff --git a/base/gfx/png_codec_unittest.cc b/base/gfx/png_codec_unittest.cc
index 0d9a44a..6b2b1ce 100644
--- a/base/gfx/png_codec_unittest.cc
+++ b/base/gfx/png_codec_unittest.cc
@@ -165,8 +165,10 @@ TEST(PNGCodec, StripAddAlpha) {
// Encode RGBA data as RGB.
std::vector<unsigned char> encoded;
- EXPECT_TRUE(PNGEncoder::Encode(&original_rgba[0], PNGEncoder::FORMAT_RGBA, w, h,
- w * 4, true, &encoded));
+ EXPECT_TRUE(PNGEncoder::Encode(&original_rgba[0],
+ PNGEncoder::FORMAT_RGBA,
+ w, h,
+ w * 4, true, &encoded));
// Decode the RGB to RGBA.
std::vector<unsigned char> decoded;
@@ -182,8 +184,10 @@ TEST(PNGCodec, StripAddAlpha) {
ASSERT_TRUE(original_rgba == decoded);
// Encode RGBA to RGBA.
- EXPECT_TRUE(PNGEncoder::Encode(&original_rgba[0], PNGEncoder::FORMAT_RGBA, w, h,
- w * 4, false, &encoded));
+ EXPECT_TRUE(PNGEncoder::Encode(&original_rgba[0],
+ PNGEncoder::FORMAT_RGBA,
+ w, h,
+ w * 4, false, &encoded));
// Decode the RGBA to RGB.
EXPECT_TRUE(PNGDecoder::Decode(&encoded[0], encoded.size(),
diff --git a/base/gfx/png_decoder.cc b/base/gfx/png_decoder.cc
index ac0cd7d..a6d9a26b 100644
--- a/base/gfx/png_decoder.cc
+++ b/base/gfx/png_decoder.cc
@@ -293,7 +293,10 @@ bool PNGDecoder::Decode(const unsigned char* input, size_t input_size,
png_set_progressive_read_fn(png_ptr, &state, &DecodeInfoCallback,
&DecodeRowCallback, &DecodeEndCallback);
- png_process_data(png_ptr, info_ptr, const_cast<unsigned char*>(input), input_size);
+ png_process_data(png_ptr,
+ info_ptr,
+ const_cast<unsigned char*>(input),
+ input_size);
if (!state.done) {
// Fed it all the data but the library didn't think we got all the data, so
diff --git a/base/gfx/png_encoder.cc b/base/gfx/png_encoder.cc
index b47db42..2130770 100755
--- a/base/gfx/png_encoder.cc
+++ b/base/gfx/png_encoder.cc
@@ -177,7 +177,8 @@ bool PNGEncoder::Encode(const unsigned char* input, ColorFormat format,
if (!converter) {
// No conversion needed, give the data directly to libpng.
for (int y = 0; y < h; y ++)
- png_write_row(png_ptr, const_cast<unsigned char*>(&input[y * row_byte_width]));
+ png_write_row(png_ptr,
+ const_cast<unsigned char*>(&input[y * row_byte_width]));
} else {
// Needs conversion using a separate buffer.
unsigned char* row = new unsigned char[w * output_color_components];