diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:54:44 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-01 23:54:44 +0000 |
commit | 59a7ae4e1e6457bfd23c235209bd594471efef95 (patch) | |
tree | 431b908c9b859eb8b85229e9a860e8b0f4c70887 /ui | |
parent | 07cb03a3088dda659d66522c69bbedef677f195e (diff) | |
download | chromium_src-59a7ae4e1e6457bfd23c235209bd594471efef95.zip chromium_src-59a7ae4e1e6457bfd23c235209bd594471efef95.tar.gz chromium_src-59a7ae4e1e6457bfd23c235209bd594471efef95.tar.bz2 |
Delete some unused code found by -Wunused-function
BUG=none,100309
Review URL: https://chromiumcodereview.appspot.com/10977073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/layout.cc | 2 | ||||
-rw-r--r-- | ui/gfx/codec/jpeg_codec.cc | 4 | ||||
-rw-r--r-- | ui/gfx/render_text_unittest.cc | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/ui/base/layout.cc b/ui/base/layout.cc index 4ae7805..84b3712 100644 --- a/ui/base/layout.cc +++ b/ui/base/layout.cc @@ -30,6 +30,7 @@ namespace { +#if defined(OS_WIN) || defined(USE_ASH) // Helper function that determines whether we want to optimize the UI for touch. bool UseTouchOptimizedUI() { // If --touch-optimized-ui is specified and not set to "auto", then override @@ -59,6 +60,7 @@ bool UseTouchOptimizedUI() { return false; #endif } +#endif // defined(OS_WIN) || defined(USE_ASH) const float kScaleFactorScales[] = {1.0f, 1.4f, 1.8f, 2.0f}; COMPILE_ASSERT(ui::NUM_SCALE_FACTORS == arraysize(kScaleFactorScales), diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc index bfa47b9..1cfd68d 100644 --- a/ui/gfx/codec/jpeg_codec.cc +++ b/ui/gfx/codec/jpeg_codec.cc @@ -143,6 +143,7 @@ void TermDestination(jpeg_compress_struct* cinfo) { state->out->resize(state->image_buffer_used); } +#if !defined(JCS_EXTENSIONS) // Converts RGBA to RGB (removing the alpha values) to prepare to send data to // libjpeg. This converts one row of data in rgba with the given width in // pixels the the given rgb destination buffer (which should have enough space @@ -172,6 +173,7 @@ void BGRAtoRGB(const unsigned char* bgra, int pixel_width, unsigned char* rgb) pixel_out[2] = pixel_in[0]; } } +#endif // !defined(JCS_EXTENSIONS) // This class destroys the given jpeg_compress object when it goes out of // scope. It simplifies the error handling in Encode (and even applies to the @@ -393,6 +395,7 @@ void SkipInputData(j_decompress_ptr cinfo, long num_bytes) { void TermSource(j_decompress_ptr cinfo) { } +#if !defined(JCS_EXTENSIONS) // Converts one row of rgb data to rgba data by adding a fully-opaque alpha // value. void AddAlpha(const unsigned char* rgb, int pixel_width, unsigned char* rgba) { @@ -419,6 +422,7 @@ void RGBtoBGRA(const unsigned char* bgra, int pixel_width, unsigned char* rgb) pixel_out[3] = 0xff; } } +#endif // !defined(JCS_EXTENSIONS) // This class destroys the given jpeg_decompress object when it goes out of // scope. It simplifies the error handling in Decode (and even applies to the diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc index fa3a6e9..447b02c 100644 --- a/ui/gfx/render_text_unittest.cc +++ b/ui/gfx/render_text_unittest.cc @@ -38,6 +38,7 @@ bool IndexInRange(const ui::Range& range, size_t index) { return index >= range.start() && index < range.end(); } +#if !defined(OS_MACOSX) // A test utility function to set the application default text direction. void SetRTL(bool rtl) { // Override the current locale/direction. @@ -48,6 +49,7 @@ void SetRTL(bool rtl) { #endif EXPECT_EQ(rtl, base::i18n::IsRTL()); } +#endif } // namespace |