skia2/include
scroggo d61c384342 Allow SkStream::peek() to partially succeed
If the stream can peek less than requested, peek that amount. Return
the number of bytes peeked.

This simplifies crrev.com/1472123002. For a stream that is smaller than
14 bytes, it can successfully peek, meaning the client will not need to
fall back to read() + rewind(), which may fail if the stream can peek
but not rewind.

This CL revives code from patch set 3 of crrev.com/1044953002, where I
initially introduced peek() (including tests).

Add a test for SkFrontBufferedStream that verifies that peeking does
not make rewind() fail (i.e. by reading past the internal buffer).

BUG=skia:3257

Review URL: https://codereview.chromium.org/1490923005
2015-12-07 11:37:13 -08:00
..
android Move SkBitmapRegionDecoder to include/android and src/android 2015-11-13 06:11:09 -08:00
animator Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
c Documentation: C API comments 2015-09-01 10:45:09 -07:00
codec Make SkAndroidCodec support ico 2015-12-04 08:00:50 -08:00
config remove SkInstCnt 2015-06-26 11:45:03 -07:00
core Allow SkStream::peek() to partially succeed 2015-12-07 11:37:13 -08:00
device/xps CMake, include/: changes to make fiddle 2.0 better 2015-12-01 09:02:49 -08:00
effects SkAlphaThresholdFilter.h allow flattening 2015-12-07 10:29:54 -08:00
gpu fix mozilla bug 2015-12-04 08:51:11 -08:00
images remove SkInstCnt 2015-06-26 11:45:03 -07:00
pathops Revert of Revert of remove SK_SUPPORT_LEGACY_PATHOP_ENUMS (patchset #1 id:1 of https://codereview.chromium.org/1203983003/) 2015-06-26 10:23:07 -07:00
pipe Fixing leaky handling of SkImage in SkDeferredCanvas. 2015-06-02 11:47:45 -07:00
ports Update documentation for SkFontMgr methods. 2015-12-03 12:12:13 -08:00
private Revert of skstd -> std for unique_ptr (patchset #17 id:320001 of https://codereview.chromium.org/1436033003/ ) 2015-12-02 12:32:02 -08:00
svg Remove SK_OFFSETOF from SkTypes, clean up offsetof usage. 2015-08-25 12:05:55 -07:00
utils clang/win: Let SK_TRACEHR not produce -Wunused-value warnings in release builds. 2015-12-07 10:41:36 -08:00
views Replace SkFunction with std::function 2015-11-12 10:41:05 -08:00
xml Move SkTemplates.h to private. 2015-08-19 11:56:48 -07:00