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

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

Issue 15806010: Separate core and images project. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Leave SkImageDecoder_iOS alone. Created 7 years, 6 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
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 "SkTypes.h"
18 19
19 class SkStream; 20 class SkStream;
20 21
21 /** \class SkImageDecoder 22 /** \class SkImageDecoder
22 23
23 Base class for decoding compressed images into a SkBitmap 24 Base class for decoding compressed images into a SkBitmap
24 */ 25 */
25 class SkImageDecoder { 26 class SkImageDecoder : public SkNoncopyable {
26 public: 27 public:
27 virtual ~SkImageDecoder(); 28 virtual ~SkImageDecoder();
28 29
29 enum Format { 30 enum Format {
30 kUnknown_Format, 31 kUnknown_Format,
31 kBMP_Format, 32 kBMP_Format,
32 kGIF_Format, 33 kGIF_Format,
33 kICO_Format, 34 kICO_Format,
34 kJPEG_Format, 35 kJPEG_Format,
35 kPNG_Format, 36 kPNG_Format,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 Chooser* fChooser; 427 Chooser* fChooser;
427 SkBitmap::Allocator* fAllocator; 428 SkBitmap::Allocator* fAllocator;
428 int fSampleSize; 429 int fSampleSize;
429 SkBitmap::Config fDefaultPref; // use if fUsePrefTable is false 430 SkBitmap::Config fDefaultPref; // use if fUsePrefTable is false
430 SkBitmap::Config fPrefTable[6]; // use if fUsePrefTable is true 431 SkBitmap::Config fPrefTable[6]; // use if fUsePrefTable is true
431 bool fDitherImage; 432 bool fDitherImage;
432 bool fUsePrefTable; 433 bool fUsePrefTable;
433 mutable bool fShouldCancelDecode; 434 mutable bool fShouldCancelDecode;
434 bool fPreferQualityOverSpeed; 435 bool fPreferQualityOverSpeed;
435 436
436 // illegal
437 SkImageDecoder(const SkImageDecoder&);
438 SkImageDecoder& operator=(const SkImageDecoder&);
439 }; 437 };
440 438
441 /** Calling newDecoder with a stream returns a new matching imagedecoder 439 /** Calling newDecoder with a stream returns a new matching imagedecoder
442 instance, or NULL if none can be found. The caller must manage its ownership 440 instance, or NULL if none can be found. The caller must manage its ownership
443 of the stream as usual, calling unref() when it is done, as the returned 441 of the stream as usual, calling unref() when it is done, as the returned
444 decoder may have called ref() (and if so, the decoder is responsible for 442 decoder may have called ref() (and if so, the decoder is responsible for
445 balancing its ownership when it is destroyed). 443 balancing its ownership when it is destroyed).
446 */ 444 */
447 class SkImageDecoderFactory : public SkRefCnt { 445 class SkImageDecoderFactory : public SkRefCnt {
448 public: 446 public:
(...skipping 27 matching lines...) Expand all
476 474
477 // All the decoders known by Skia. Note that, depending on the compiler settings , 475 // All the decoders known by Skia. Note that, depending on the compiler settings ,
478 // not all of these will be available 476 // not all of these will be available
479 DECLARE_DECODER_CREATOR(BMPImageDecoder); 477 DECLARE_DECODER_CREATOR(BMPImageDecoder);
480 DECLARE_DECODER_CREATOR(GIFImageDecoder); 478 DECLARE_DECODER_CREATOR(GIFImageDecoder);
481 DECLARE_DECODER_CREATOR(ICOImageDecoder); 479 DECLARE_DECODER_CREATOR(ICOImageDecoder);
482 DECLARE_DECODER_CREATOR(JPEGImageDecoder); 480 DECLARE_DECODER_CREATOR(JPEGImageDecoder);
483 DECLARE_DECODER_CREATOR(PNGImageDecoder); 481 DECLARE_DECODER_CREATOR(PNGImageDecoder);
484 DECLARE_DECODER_CREATOR(WBMPImageDecoder); 482 DECLARE_DECODER_CREATOR(WBMPImageDecoder);
485 DECLARE_DECODER_CREATOR(WEBPImageDecoder); 483 DECLARE_DECODER_CREATOR(WEBPImageDecoder);
486
487 #endif 484 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698