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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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
« no previous file with comments | « include/core/SkAnnotation.h ('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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkImageDecoder_DEFINED 8 #ifndef SkImageDecoder_DEFINED
9 #define SkImageDecoder_DEFINED 9 #define SkImageDecoder_DEFINED
10 10
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 }; 436 };
437 437
438 // This macro declares a global (i.e., non-class owned) creation entry point 438 // This macro declares a global (i.e., non-class owned) creation entry point
439 // for each decoder (e.g., CreateJPEGImageDecoder) 439 // for each decoder (e.g., CreateJPEGImageDecoder)
440 #define DECLARE_DECODER_CREATOR(codec) \ 440 #define DECLARE_DECODER_CREATOR(codec) \
441 SkImageDecoder *Create ## codec (); 441 SkImageDecoder *Create ## codec ();
442 442
443 // This macro defines the global creation entry point for each decoder. Each 443 // This macro defines the global creation entry point for each decoder. Each
444 // decoder implementation that registers with the decoder factory must call it. 444 // decoder implementation that registers with the decoder factory must call it.
445 #define DEFINE_DECODER_CREATOR(codec) \ 445 #define DEFINE_DECODER_CREATOR(codec) \
446 SkImageDecoder *Create ## codec () { \ 446 SkImageDecoder* Create##codec() { return new Sk##codec; }
447 return SkNEW( Sk ## codec ); \
448 }
449 447
450 // All the decoders known by Skia. Note that, depending on the compiler settings , 448 // All the decoders known by Skia. Note that, depending on the compiler settings ,
451 // not all of these will be available 449 // not all of these will be available
452 DECLARE_DECODER_CREATOR(BMPImageDecoder); 450 DECLARE_DECODER_CREATOR(BMPImageDecoder);
453 DECLARE_DECODER_CREATOR(GIFImageDecoder); 451 DECLARE_DECODER_CREATOR(GIFImageDecoder);
454 DECLARE_DECODER_CREATOR(ICOImageDecoder); 452 DECLARE_DECODER_CREATOR(ICOImageDecoder);
455 DECLARE_DECODER_CREATOR(JPEGImageDecoder); 453 DECLARE_DECODER_CREATOR(JPEGImageDecoder);
456 DECLARE_DECODER_CREATOR(PNGImageDecoder); 454 DECLARE_DECODER_CREATOR(PNGImageDecoder);
457 DECLARE_DECODER_CREATOR(WBMPImageDecoder); 455 DECLARE_DECODER_CREATOR(WBMPImageDecoder);
458 DECLARE_DECODER_CREATOR(WEBPImageDecoder); 456 DECLARE_DECODER_CREATOR(WEBPImageDecoder);
459 DECLARE_DECODER_CREATOR(PKMImageDecoder); 457 DECLARE_DECODER_CREATOR(PKMImageDecoder);
460 DECLARE_DECODER_CREATOR(KTXImageDecoder); 458 DECLARE_DECODER_CREATOR(KTXImageDecoder);
461 DECLARE_DECODER_CREATOR(ASTCImageDecoder); 459 DECLARE_DECODER_CREATOR(ASTCImageDecoder);
462 460
463 // Typedefs to make registering decoder and formatter callbacks easier. 461 // Typedefs to make registering decoder and formatter callbacks easier.
464 // These have to be defined outside SkImageDecoder. :( 462 // These have to be defined outside SkImageDecoder. :(
465 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod er_DecodeReg; 463 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod er_DecodeReg;
466 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod er_FormatReg; 464 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod er_FormatReg;
467 465
468 #endif 466 #endif
OLDNEW
« no previous file with comments | « include/core/SkAnnotation.h ('k') | include/core/SkImageEncoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698