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
This commit is contained in:
parent
871ad7a13e
commit
5cffba8d8e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user