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

Side by Side Diff: include/codec/SkCodec.h

Issue 947283002: Bmp Image Decoding (Closed) Base URL: https://skia.googlesource.com/skia.git@decode-leon-3
Patch Set: More code sharing Created 5 years, 9 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
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_DEFINED 8 #ifndef SkCodec_DEFINED
9 #define SkCodec_DEFINED 9 #define SkCodec_DEFINED
10 10
11 #include "SkEndian.h"
11 #include "SkImageGenerator.h" 12 #include "SkImageGenerator.h"
12 #include "SkImageInfo.h" 13 #include "SkImageInfo.h"
13 #include "SkSize.h" 14 #include "SkSize.h"
14 #include "SkTemplates.h" 15 #include "SkTemplates.h"
15 #include "SkTypes.h" 16 #include "SkTypes.h"
16 17
17 class SkData; 18 class SkData;
18 class SkStream; 19 class SkStream;
19 20
20 /** 21 /**
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 * succeeded. 78 * succeeded.
78 * - if the stream did not need to be rewound. 79 * - if the stream did not need to be rewound.
79 * false 80 * false
80 * - if the stream needed to be rewound, and rewind failed. 81 * - if the stream needed to be rewound, and rewind failed.
81 * Subclasses MUST call this function before reading the stream (e.g. in 82 * Subclasses MUST call this function before reading the stream (e.g. in
82 * onGetPixels). If it returns false, onGetPixels should return 83 * onGetPixels). If it returns false, onGetPixels should return
83 * kCouldNotRewind. 84 * kCouldNotRewind.
84 */ 85 */
85 bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); 86 bool SK_WARN_UNUSED_RESULT rewindIfNeeded();
86 87
88 /*
89 *
90 * Get method for the input stream
91 *
92 */
93 SkStream* stream() {
94 return fStream.get();
95 }
96
87 private: 97 private:
88 const SkImageInfo fInfo; 98 const SkImageInfo fInfo;
89 SkAutoTDelete<SkStream> fStream; 99 SkAutoTDelete<SkStream> fStream;
90 bool fNeedsRewind; 100 bool fNeedsRewind;
91 }; 101 };
92 #endif // SkCodec_DEFINED 102 #endif // SkCodec_DEFINED
OLDNEW
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkCodec.cpp » ('j') | src/codec/SkCodec_libbmp.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698