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

Side by Side Diff: include/core/SkImageDecoder.h

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reed+scroggo Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gm/gm.cpp ('k') | include/core/SkImageEncoder.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 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkImageDecoder_DEFINED 10 #ifndef SkImageDecoder_DEFINED
11 #define SkImageDecoder_DEFINED 11 #define SkImageDecoder_DEFINED
12 12
13 #include "SkBitmap.h" 13 #include "SkBitmap.h"
14 #include "SkBitmapFactory.h" 14 #include "SkBitmapFactory.h"
15 #include "SkImage.h" 15 #include "SkImage.h"
16 #include "SkRect.h" 16 #include "SkRect.h"
17 #include "SkRefCnt.h" 17 #include "SkRefCnt.h"
18 #include "SkTRegistry.h"
18 #include "SkTypes.h" 19 #include "SkTypes.h"
19 20
20 class SkStream; 21 class SkStream;
21 22
22 /** \class SkImageDecoder 23 /** \class SkImageDecoder
23 24
24 Base class for decoding compressed images into a SkBitmap 25 Base class for decoding compressed images into a SkBitmap
25 */ 26 */
26 class SkImageDecoder : public SkNoncopyable { 27 class SkImageDecoder : public SkNoncopyable {
27 public: 28 public:
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // All the decoders known by Skia. Note that, depending on the compiler settings , 551 // All the decoders known by Skia. Note that, depending on the compiler settings ,
551 // not all of these will be available 552 // not all of these will be available
552 DECLARE_DECODER_CREATOR(BMPImageDecoder); 553 DECLARE_DECODER_CREATOR(BMPImageDecoder);
553 DECLARE_DECODER_CREATOR(GIFImageDecoder); 554 DECLARE_DECODER_CREATOR(GIFImageDecoder);
554 DECLARE_DECODER_CREATOR(ICOImageDecoder); 555 DECLARE_DECODER_CREATOR(ICOImageDecoder);
555 DECLARE_DECODER_CREATOR(JPEGImageDecoder); 556 DECLARE_DECODER_CREATOR(JPEGImageDecoder);
556 DECLARE_DECODER_CREATOR(PNGImageDecoder); 557 DECLARE_DECODER_CREATOR(PNGImageDecoder);
557 DECLARE_DECODER_CREATOR(WBMPImageDecoder); 558 DECLARE_DECODER_CREATOR(WBMPImageDecoder);
558 DECLARE_DECODER_CREATOR(WEBPImageDecoder); 559 DECLARE_DECODER_CREATOR(WEBPImageDecoder);
559 560
561
562 // Typedefs to make registering decoder and formatter callbacks easier.
563 // These have to be defined outside SkImageDecoder. :(
564 typedef SkTRegistry<SkImageDecoder*(*)(SkStream*)> SkImageDecoder_DecodeR eg;
565 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> SkImageDecoder_FormatR eg;
566
560 #endif 567 #endif
OLDNEW
« no previous file with comments | « gm/gm.cpp ('k') | include/core/SkImageEncoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698