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

Unified Diff: src/utils/win/SkIStream.cpp

Issue 23477009: Change SkImageDecoders to take an SkStreamRewindable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Only switch to SkStreamRewindable when necessary. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkImageDecoder_empty.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/win/SkIStream.cpp
diff --git a/src/utils/win/SkIStream.cpp b/src/utils/win/SkIStream.cpp
index 7880fa0790c3251ca64e9963db6c4ca8e44f0185..182d9a8caab1bd6594ef36727194e4b8db0b1739 100644
--- a/src/utils/win/SkIStream.cpp
+++ b/src/utils/win/SkIStream.cpp
@@ -176,6 +176,8 @@ HRESULT STDMETHODCALLTYPE SkIStream::Seek(LARGE_INTEGER liDistanceToMove
if (!this->fSkStream->rewind()) {
hr = E_FAIL;
} else {
+ // FIXME: Should not depend on getLength.
+ // See https://code.google.com/p/skia/issues/detail?id=1570
LONGLONG skip = this->fSkStream->getLength()
+ liDistanceToMove.QuadPart;
size_t skipped = this->fSkStream->skip(static_cast<size_t>(skip));
@@ -204,6 +206,8 @@ HRESULT STDMETHODCALLTYPE SkIStream::Stat(STATSTG* pStatstg
return STG_E_INVALIDFLAG;
}
pStatstg->pwcsName = NULL;
+ // FIXME: Should not depend on getLength
+ // See https://code.google.com/p/skia/issues/detail?id=1570
pStatstg->cbSize.QuadPart = this->fSkStream->getLength();
pStatstg->clsid = CLSID_NULL;
pStatstg->type = STGTY_STREAM;
« no previous file with comments | « src/ports/SkImageDecoder_empty.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698