Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: ui/gfx/codec/jpeg_codec.cc

Issue 10977073: Delete some unused code found by -Wunused-function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leiz Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/layout.cc ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/jpeg_codec.cc
diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc
index bfa47b97d5537cfff2246b34239fe14054478c62..1cfd68dbbab2103d8e6f3e5da45f2802bdf9b0f9 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
« no previous file with comments | « ui/base/layout.cc ('k') | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698