diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:04:46 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-30 03:04:46 +0000 |
commit | 381bc458bfc58a239f3dfe69b008c6d3522869a2 (patch) | |
tree | 47d1ce68c60dbf2590e92c5fcf8ad4954a42aa12 /printing | |
parent | 7781bb91a12839e409b9904c06d8f9072d1a3ae8 (diff) | |
download | chromium_src-381bc458bfc58a239f3dfe69b008c6d3522869a2.zip chromium_src-381bc458bfc58a239f3dfe69b008c6d3522869a2.tar.gz chromium_src-381bc458bfc58a239f3dfe69b008c6d3522869a2.tar.bz2 |
FBTF: Remove unneeded headers from base/ (part 10)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5139006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/image.cc | 11 | ||||
-rw-r--r-- | printing/image.h | 11 | ||||
-rw-r--r-- | printing/image_mac.cc | 1 | ||||
-rw-r--r-- | printing/image_win.cc | 1 |
4 files changed, 15 insertions, 9 deletions
diff --git a/printing/image.cc b/printing/image.cc index dd52380..affd5db 100644 --- a/printing/image.cc +++ b/printing/image.cc @@ -4,7 +4,10 @@ #include "printing/image.h" +#include <algorithm> + #include "base/file_util.h" +#include "base/logging.h" #include "base/md5.h" #include "base/string_number_conversions.h" #include "gfx/codec/png_codec.h" @@ -131,6 +134,14 @@ double Image::PercentageDifferent(const Image& rhs) const { return static_cast<double>(pixels_different) / total_pixels * 100.; } +uint32 Image::pixel_at(int x, int y) const { + DCHECK(x >= 0 && x < size_.width()); + DCHECK(y >= 0 && y < size_.height()); + const uint32* data = reinterpret_cast<const uint32*>(&*data_.begin()); + const uint32* data_row = data + y * row_length_ / sizeof(uint32); + return Color(data_row[x]); +} + bool Image::LoadPng(const std::string& compressed) { int w; int h; diff --git a/printing/image.h b/printing/image.h index d10c61b..8336a92 100644 --- a/printing/image.h +++ b/printing/image.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,7 +9,6 @@ #include <vector> #include "base/basictypes.h" -#include "base/logging.h" #include "gfx/size.h" #include "printing/native_metafile.h" @@ -56,13 +55,7 @@ class Image { return color; } - uint32 pixel_at(int x, int y) const { - DCHECK(x >= 0 && x < size_.width()); - DCHECK(y >= 0 && y < size_.height()); - const uint32* data = reinterpret_cast<const uint32*>(&*data_.begin()); - const uint32* data_row = data + y * row_length_ / sizeof(uint32); - return Color(data_row[x]); - } + uint32 pixel_at(int x, int y) const; private: // Construct from metafile. This is kept internal since it's ambiguous what diff --git a/printing/image_mac.cc b/printing/image_mac.cc index 8b3d638..842e0a6 100644 --- a/printing/image_mac.cc +++ b/printing/image_mac.cc @@ -6,6 +6,7 @@ #include <ApplicationServices/ApplicationServices.h> +#include "base/logging.h" #include "base/mac/scoped_cftyperef.h" #include "gfx/rect.h" diff --git a/printing/image_win.cc b/printing/image_win.cc index e8bd368..02d36b8 100644 --- a/printing/image_win.cc +++ b/printing/image_win.cc @@ -4,6 +4,7 @@ #include "printing/image.h" +#include "base/logging.h" #include "gfx/gdi_util.h" // EMF support #include "gfx/rect.h" #include "skia/ext/platform_device.h" |