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

Side by Side Diff: src/images/SkImageDecoder.cpp

Issue 16410009: Add an option to create unpremultiplied bitmaps. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix for andriod only code. 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
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('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 8
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 22 matching lines...) Expand all
33 /////////////////////////////////////////////////////////////////////////////// 33 ///////////////////////////////////////////////////////////////////////////////
34 34
35 SkImageDecoder::SkImageDecoder() 35 SkImageDecoder::SkImageDecoder()
36 : fPeeker(NULL) 36 : fPeeker(NULL)
37 , fChooser(NULL) 37 , fChooser(NULL)
38 , fAllocator(NULL) 38 , fAllocator(NULL)
39 , fSampleSize(1) 39 , fSampleSize(1)
40 , fDefaultPref(SkBitmap::kNo_Config) 40 , fDefaultPref(SkBitmap::kNo_Config)
41 , fDitherImage(true) 41 , fDitherImage(true)
42 , fUsePrefTable(false) 42 , fUsePrefTable(false)
43 , fPreferQualityOverSpeed(false) { 43 , fPreferQualityOverSpeed(false)
44 , fRequireUnpremultipliedColors(false) {
44 } 45 }
45 46
46 SkImageDecoder::~SkImageDecoder() { 47 SkImageDecoder::~SkImageDecoder() {
47 SkSafeUnref(fPeeker); 48 SkSafeUnref(fPeeker);
48 SkSafeUnref(fChooser); 49 SkSafeUnref(fChooser);
49 SkSafeUnref(fAllocator); 50 SkSafeUnref(fAllocator);
50 } 51 }
51 52
52 SkImageDecoder::Format SkImageDecoder::getFormat() const { 53 SkImageDecoder::Format SkImageDecoder::getFormat() const {
53 return kUnknown_Format; 54 return kUnknown_Format;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 if (kUnknown_Format == *format) { 444 if (kUnknown_Format == *format) {
444 if (stream->rewind()) { 445 if (stream->rewind()) {
445 *format = GetStreamFormat(stream); 446 *format = GetStreamFormat(stream);
446 } 447 }
447 } 448 }
448 } 449 }
449 delete codec; 450 delete codec;
450 } 451 }
451 return success; 452 return success;
452 } 453 }
OLDNEW
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698