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

Side by Side Diff: ui/gfx/codec/jpeg_codec.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/gfx/codec/png_codec.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_CODEC_JPEG_CODEC_H_ 5 #ifndef UI_GFX_CODEC_JPEG_CODEC_H_
6 #define UI_GFX_CODEC_JPEG_CODEC_H_ 6 #define UI_GFX_CODEC_JPEG_CODEC_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
12 12
13 class SkBitmap; 13 class SkBitmap;
14 14
15 namespace gfx { 15 namespace gfx {
16 16
17 // Interface for encoding/decoding JPEG data. This is a wrapper around libjpeg, 17 // Interface for encoding/decoding JPEG data. This is a wrapper around libjpeg,
18 // which has an inconvenient interface for callers. This is only used for UI 18 // which has an inconvenient interface for callers. This is only used for UI
19 // elements, WebKit has its own more complicated JPEG decoder which handles, 19 // elements, WebKit has its own more complicated JPEG decoder which handles,
20 // among other things, partially downloaded data. 20 // among other things, partially downloaded data.
21 class UI_EXPORT JPEGCodec { 21 class GFX_EXPORT JPEGCodec {
22 public: 22 public:
23 enum ColorFormat { 23 enum ColorFormat {
24 // 3 bytes per pixel (packed), in RGB order regardless of endianness. 24 // 3 bytes per pixel (packed), in RGB order regardless of endianness.
25 // This is the native JPEG format. 25 // This is the native JPEG format.
26 FORMAT_RGB, 26 FORMAT_RGB,
27 27
28 // 4 bytes per pixel, in RGBA order in mem regardless of endianness. 28 // 4 bytes per pixel, in RGBA order in mem regardless of endianness.
29 FORMAT_RGBA, 29 FORMAT_RGBA,
30 30
31 // 4 bytes per pixel, in BGRA order in mem regardless of endianness. 31 // 4 bytes per pixel, in BGRA order in mem regardless of endianness.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Decodes the JPEG data contained in input of length input_size. If 71 // Decodes the JPEG data contained in input of length input_size. If
72 // successful, a SkBitmap is created and returned. It is up to the caller 72 // successful, a SkBitmap is created and returned. It is up to the caller
73 // to delete the returned bitmap. 73 // to delete the returned bitmap.
74 static SkBitmap* Decode(const unsigned char* input, size_t input_size); 74 static SkBitmap* Decode(const unsigned char* input, size_t input_size);
75 }; 75 };
76 76
77 } // namespace gfx 77 } // namespace gfx
78 78
79 #endif // UI_GFX_CODEC_JPEG_CODEC_H_ 79 #endif // UI_GFX_CODEC_JPEG_CODEC_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/gfx/codec/png_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698