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

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

Issue 1567863003: Rename SkGifCodec, SkIcoCodec, SkWbmpCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/codec/SkIcoCodec.h ('k') | src/codec/SkWbmpCodec.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 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 "SkBmpCodec.h" 8 #include "SkBmpCodec.h"
9 #include "SkCodec_libico.h"
10 #include "SkCodec_libpng.h" 9 #include "SkCodec_libpng.h"
11 #include "SkCodecPriv.h" 10 #include "SkCodecPriv.h"
12 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
13 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkIcoCodec.h"
14 #include "SkStream.h" 14 #include "SkStream.h"
15 #include "SkTDArray.h" 15 #include "SkTDArray.h"
16 #include "SkTSort.h" 16 #include "SkTSort.h"
17 17
18 static bool ico_conversion_possible(const SkImageInfo& dstInfo) { 18 static bool ico_conversion_possible(const SkImageInfo& dstInfo) {
19 // We only support kN32_SkColorType. 19 // We only support kN32_SkColorType.
20 // This makes sense for BMP-in-ICO. The presence of an AND 20 // This makes sense for BMP-in-ICO. The presence of an AND
21 // mask (which changes colors and adds transparency) means that 21 // mask (which changes colors and adds transparency) means that
22 // we cannot use k565 or kIndex8. 22 // we cannot use k565 or kIndex8.
23 // FIXME: For PNG-in-ICO, we could technically support whichever 23 // FIXME: For PNG-in-ICO, we could technically support whichever
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 SkCodec::SkScanlineOrder SkIcoCodec::onGetScanlineOrder() const { 369 SkCodec::SkScanlineOrder SkIcoCodec::onGetScanlineOrder() const {
370 // FIXME: This function will possibly return the wrong value if it is called 370 // FIXME: This function will possibly return the wrong value if it is called
371 // before startScanlineDecode(). 371 // before startScanlineDecode().
372 return fCurrScanlineCodec ? fCurrScanlineCodec->getScanlineOrder() : 372 return fCurrScanlineCodec ? fCurrScanlineCodec->getScanlineOrder() :
373 INHERITED::onGetScanlineOrder(); 373 INHERITED::onGetScanlineOrder();
374 } 374 }
375 375
376 SkSampler* SkIcoCodec::getSampler(bool createIfNecessary) { 376 SkSampler* SkIcoCodec::getSampler(bool createIfNecessary) {
377 return fCurrScanlineCodec ? fCurrScanlineCodec->getSampler(createIfNecessary ) : nullptr; 377 return fCurrScanlineCodec ? fCurrScanlineCodec->getSampler(createIfNecessary ) : nullptr;
378 } 378 }
OLDNEW
« no previous file with comments | « src/codec/SkIcoCodec.h ('k') | src/codec/SkWbmpCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698