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

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

Issue 816273002: remove dead SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 12 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 | « src/images/SkImageDecoder_ktx.cpp ('k') | src/images/SkImageDecoder_libico.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 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkColorTable.h" 10 #include "SkColorTable.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 height = innerHeight; 303 height = innerHeight;
304 imageTop = 0; 304 imageTop = 0;
305 } else if (imageTop + innerHeight > height) { 305 } else if (imageTop + innerHeight > height) {
306 gif_warning(*bm, "shifting image up to fit"); 306 gif_warning(*bm, "shifting image up to fit");
307 imageTop = height - innerHeight; 307 imageTop = height - innerHeight;
308 } else if (imageTop < 0) { 308 } else if (imageTop < 0) {
309 gif_warning(*bm, "shifting image down to fit"); 309 gif_warning(*bm, "shifting image down to fit");
310 imageTop = 0; 310 imageTop = 0;
311 } 311 }
312 312
313 #ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
314 // FIXME: We could give the caller a choice of images or configs.
315 if (!this->chooseFromOneChoice(kIndex_8_SkColorType, width, height)) {
316 return error_return(*bm, "chooseFromOneChoice");
317 }
318 #endif
319
320 SkScaledBitmapSampler sampler(width, height, this->getSampleSize()); 313 SkScaledBitmapSampler sampler(width, height, this->getSampleSize());
321 314
322 bm->setInfo(SkImageInfo::Make(sampler.scaledWidth(), sampler.scaledH eight(), 315 bm->setInfo(SkImageInfo::Make(sampler.scaledWidth(), sampler.scaledH eight(),
323 kIndex_8_SkColorType, kPremul_SkAlphaT ype)); 316 kIndex_8_SkColorType, kPremul_SkAlphaT ype));
324 317
325 if (SkImageDecoder::kDecodeBounds_Mode == mode) { 318 if (SkImageDecoder::kDecodeBounds_Mode == mode) {
326 return kSuccess; 319 return kSuccess;
327 } 320 }
328 321
329 322
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 static SkImageDecoder_DecodeReg gReg(sk_libgif_dfactory); 521 static SkImageDecoder_DecodeReg gReg(sk_libgif_dfactory);
529 522
530 static SkImageDecoder::Format get_format_gif(SkStreamRewindable* stream) { 523 static SkImageDecoder::Format get_format_gif(SkStreamRewindable* stream) {
531 if (is_gif(stream)) { 524 if (is_gif(stream)) {
532 return SkImageDecoder::kGIF_Format; 525 return SkImageDecoder::kGIF_Format;
533 } 526 }
534 return SkImageDecoder::kUnknown_Format; 527 return SkImageDecoder::kUnknown_Format;
535 } 528 }
536 529
537 static SkImageDecoder_FormatReg gFormatReg(get_format_gif); 530 static SkImageDecoder_FormatReg gFormatReg(get_format_gif);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_ktx.cpp ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698