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

Side by Side Diff: src/codec/SkAndroidCodec.cpp

Issue 1445643002: Make SkAndroidCodec support wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « dm/DM.cpp ('k') | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 #include "SkAndroidCodec.h" 8 #include "SkAndroidCodec.h"
9 #include "SkCodec.h" 9 #include "SkCodec.h"
10 #include "SkCodecPriv.h" 10 #include "SkCodecPriv.h"
(...skipping 13 matching lines...) Expand all
24 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream)); 24 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream));
25 if (nullptr == codec) { 25 if (nullptr == codec) {
26 return nullptr; 26 return nullptr;
27 } 27 }
28 28
29 switch (codec->getEncodedFormat()) { 29 switch (codec->getEncodedFormat()) {
30 case kWEBP_SkEncodedFormat: 30 case kWEBP_SkEncodedFormat:
31 return new SkWebpAdapterCodec((SkWebpCodec*) codec.detach()); 31 return new SkWebpAdapterCodec((SkWebpCodec*) codec.detach());
32 case kPNG_SkEncodedFormat: 32 case kPNG_SkEncodedFormat:
33 case kJPEG_SkEncodedFormat: 33 case kJPEG_SkEncodedFormat:
34 case kWBMP_SkEncodedFormat:
34 return new SkSampledCodec(codec.detach()); 35 return new SkSampledCodec(codec.detach());
35 default: 36 default:
36 // FIXME: SkSampledCodec is temporarily disabled for other formats 37 // FIXME: SkSampledCodec is temporarily disabled for other formats
37 // while focusing on the formats that are supported by 38 // while focusing on the formats that are supported by
38 // BitmapRegionDecoder. 39 // BitmapRegionDecoder.
39 return nullptr; 40 return nullptr;
40 } 41 }
41 } 42 }
42 43
43 SkAndroidCodec* SkAndroidCodec::NewFromData(SkData* data) { 44 SkAndroidCodec* SkAndroidCodec::NewFromData(SkData* data) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 } 122 }
122 123
123 return this->onGetAndroidPixels(info, pixels, rowBytes, *options); 124 return this->onGetAndroidPixels(info, pixels, rowBytes, *options);
124 } 125 }
125 126
126 SkCodec::Result SkAndroidCodec::getAndroidPixels(const SkImageInfo& info, void* pixels, 127 SkCodec::Result SkAndroidCodec::getAndroidPixels(const SkImageInfo& info, void* pixels,
127 size_t rowBytes) { 128 size_t rowBytes) {
128 return this->getAndroidPixels(info, pixels, rowBytes, nullptr); 129 return this->getAndroidPixels(info, pixels, rowBytes, nullptr);
129 } 130 }
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698