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

Side by Side Diff: src/codec/SkCodec_wbmp.h

Issue 1472123002: Make SkCodec support peek() and read() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 5 years 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/SkCodec_libpng.cpp ('k') | src/codec/SkCodec_wbmp.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 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 #ifndef SkCodec_wbmp_DEFINED 8 #ifndef SkCodec_wbmp_DEFINED
9 #define SkCodec_wbmp_DEFINED 9 #define SkCodec_wbmp_DEFINED
10 10
11 #include "SkCodec.h" 11 #include "SkCodec.h"
12 #include "SkSwizzler.h" 12 #include "SkSwizzler.h"
13 13
14 class SkWbmpCodec final : public SkCodec { 14 class SkWbmpCodec final : public SkCodec {
15 public: 15 public:
16 static bool IsWbmp(SkStream*); 16 static bool IsWbmp(const void*, size_t);
17 17
18 /* 18 /*
19 * Assumes IsWbmp was called and returned true 19 * Assumes IsWbmp was called and returned true
20 * Creates a wbmp codec 20 * Creates a wbmp codec
21 * Takes ownership of the stream 21 * Takes ownership of the stream
22 */ 22 */
23 static SkCodec* NewFromStream(SkStream*); 23 static SkCodec* NewFromStream(SkStream*);
24 24
25 protected: 25 protected:
26 SkEncodedFormat onGetEncodedFormat() const override; 26 SkEncodedFormat onGetEncodedFormat() const override;
(...skipping 27 matching lines...) Expand all
54 54
55 // FIXME: Override onSkipScanlines to avoid swizzling. 55 // FIXME: Override onSkipScanlines to avoid swizzling.
56 int onGetScanlines(void* dst, int count, size_t dstRowBytes) override; 56 int onGetScanlines(void* dst, int count, size_t dstRowBytes) override;
57 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons, 57 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti ons,
58 SkPMColor inputColorTable[], int* inputColorCount) override; 58 SkPMColor inputColorTable[], int* inputColorCount) override;
59 59
60 typedef SkCodec INHERITED; 60 typedef SkCodec INHERITED;
61 }; 61 };
62 62
63 #endif // SkCodec_wbmp_DEFINED 63 #endif // SkCodec_wbmp_DEFINED
OLDNEW
« no previous file with comments | « src/codec/SkCodec_libpng.cpp ('k') | src/codec/SkCodec_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698