diff options
author | 2015-03-27 13:27:51 -0700 | |
---|---|---|
committer | 2015-03-27 13:27:51 -0700 | |
commit | 5cffba8d8e6965b10017fae7d8b67c8724e12822 (patch) | |
tree | 07907782f77f7587a087fe3fd379cb3faf678abc /include/core/SkStream.h | |
parent | 871ad7a13edbc0458e6a05c02697681857f97321 (diff) |
Remove SkMemoryStream::peek()
I'd like to add a new API to SkStream for peeking - i.e. reading some
bytes without advancing the stream. This will be implemented for the
streams where it makes sense. I think the function should look
something like the following:
size_t peek(void* buffer, size_t bytesToRead) {
return this->onPeek(buffer, bytesToRead);
}
virtual size_t onPeek(void* buffer, size_t bytesToRead) {
return 0; // unimplemented base class.
}
In order to avoid confusion, I'd like to remove SkMemoryStream::peek(),
which is not currently used internally, by Chrome, or by Android as far
as I can tell. There is also another function does the same thing:
getPosition().
BUG=skia:3257
Review URL: https://codereview.chromium.org/1039373002
Diffstat (limited to 'include/core/SkStream.h')
-rw-r--r-- | include/core/SkStream.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/core/SkStream.h b/include/core/SkStream.h index 829ece6496..c227765b36 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -315,7 +315,6 @@ public: void skipToAlign4(); const void* getAtPos(); - size_t peek() const { return fOffset; } size_t read(void* buffer, size_t size) override; bool isAtEnd() const override; |