Index: src/ports/SkFontHost_fontconfig.cpp |
=================================================================== |
--- src/ports/SkFontHost_fontconfig.cpp (revision 8280) |
+++ src/ports/SkFontHost_fontconfig.cpp (working copy) |
@@ -247,6 +247,13 @@ |
static SkStream* open_stream(const FontConfigTypeface* face, int* ttcIndex) { |
SkStream* stream = face->getLocalStream(); |
if (stream) { |
+ // TODO: fix issue 1176. |
+ // As of now open_stream will return a stream and unwind it, but the |
+ // SkStream is not thread safe, and if two threads use the stream they |
+ // may collide and print preview for example could still fail, |
+ // or there could be some failures in rendering if this stream is used |
+ // there. |
+ stream->rewind(); |
stream->ref(); |
// should have been provided by CreateFromStream() |
*ttcIndex = 0; |