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

Unified Diff: src/core/SkStream.cpp

Issue 1530783003: add fsync to try to get complete skps from webpage picture capture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: exclude android and friends that may not define fileno Created 5 years 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
Index: src/core/SkStream.cpp
diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp
index fff8f3382209b9fd9509d55a916b711022d7721e..6795b97bdd5037c737c109d8b84238f26e0ed629 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -79,6 +79,10 @@ void SkWStream::flush()
{
}
+void SkWStream::sync()
+{
+}
+
bool SkWStream::writeText(const char text[])
{
SkASSERT(text);
@@ -463,6 +467,13 @@ void SkFILEWStream::flush()
}
}
+void SkFILEWStream::sync()
+{
+ if (fFILE) {
+ sk_fsync(fFILE);
+ }
+}
+
////////////////////////////////////////////////////////////////////////
SkMemoryWStream::SkMemoryWStream(void* buffer, size_t size)

Powered by Google App Engine
This is Rietveld 408576698