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

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

Issue 7569005: Rename UI_API to UI_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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_skia.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 #pragma once 7 #pragma once
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ui/ui_api.h" 12 #include "ui/base/ui_export.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 15
16 namespace gfx { 16 namespace gfx {
17 17
18 // Interface for encoding/decoding JPEG data. This is a wrapper around libjpeg, 18 // Interface for encoding/decoding JPEG data. This is a wrapper around libjpeg,
19 // which has an inconvenient interface for callers. This is only used for UI 19 // which has an inconvenient interface for callers. This is only used for UI
20 // elements, WebKit has its own more complicated JPEG decoder which handles, 20 // elements, WebKit has its own more complicated JPEG decoder which handles,
21 // among other things, partially downloaded data. 21 // among other things, partially downloaded data.
22 class UI_API JPEGCodec { 22 class UI_EXPORT JPEGCodec {
23 public: 23 public:
24 enum ColorFormat { 24 enum ColorFormat {
25 // 3 bytes per pixel (packed), in RGB order regardless of endianness. 25 // 3 bytes per pixel (packed), in RGB order regardless of endianness.
26 // This is the native JPEG format. 26 // This is the native JPEG format.
27 FORMAT_RGB, 27 FORMAT_RGB,
28 28
29 // 4 bytes per pixel, in RGBA order in mem regardless of endianness. 29 // 4 bytes per pixel, in RGBA order in mem regardless of endianness.
30 FORMAT_RGBA, 30 FORMAT_RGBA,
31 31
32 // 4 bytes per pixel, in BGRA order in mem regardless of endianness. 32 // 4 bytes per pixel, in BGRA order in mem regardless of endianness.
(...skipping 29 matching lines...) Expand all
62 62
63 // Decodes the JPEG data contained in input of length input_size. If 63 // Decodes the JPEG data contained in input of length input_size. If
64 // successful, a SkBitmap is created and returned. It is up to the caller 64 // successful, a SkBitmap is created and returned. It is up to the caller
65 // to delete the returned bitmap. 65 // to delete the returned bitmap.
66 static SkBitmap* Decode(const unsigned char* input, size_t input_size); 66 static SkBitmap* Decode(const unsigned char* input, size_t input_size);
67 }; 67 };
68 68
69 } // namespace gfx 69 } // namespace gfx
70 70
71 #endif // UI_GFX_CODEC_JPEG_CODEC_H_ 71 #endif // UI_GFX_CODEC_JPEG_CODEC_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.h ('k') | ui/gfx/codec/png_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698