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

Issue 1039373002: Remove SkMemoryStream::peek() (Closed)

Created:
5 years, 9 months ago by scroggo
Modified:
5 years, 9 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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 Committed: https://skia.googlesource.com/skia/+/5cffba8d8e6965b10017fae7d8b67c8724e12822

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -1 line) Patch
M include/core/SkStream.h View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
scroggo
5 years, 9 months ago (2015-03-27 19:32:15 UTC) #2
reed1
+1 for removing unused APIs -- api lgtm
5 years, 9 months ago (2015-03-27 20:14:54 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1039373002/1
5 years, 9 months ago (2015-03-27 20:22:44 UTC) #5
commit-bot: I haz the power
5 years, 9 months ago (2015-03-27 20:27:56 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/5cffba8d8e6965b10017fae7d8b67c8724e12822

Powered by Google App Engine
This is Rietveld 408576698