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

Unified Diff: src/ports/SkOSFile_stdio.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: make sync nonvirtual 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
« no previous file with comments | « src/core/SkStream.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkOSFile_stdio.cpp
diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp
index 3371bb7031b7b1c871560a564139a4ad54dc5e3e..ecd5a027fcd82618d371b136c43e7b4f200f02bb 100644
--- a/src/ports/SkOSFile_stdio.cpp
+++ b/src/ports/SkOSFile_stdio.cpp
@@ -143,6 +143,14 @@ void sk_fflush(FILE* f) {
::fflush(f);
}
+void sk_fsync(FILE* f) {
+#if !defined(_WIN32) && !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) \
+ && !defined(_NEWLIB_VERSION)
+ int fd = ::fileno(f);
+ ::fsync(fd);
+#endif
+}
+
bool sk_fseek(FILE* f, size_t byteCount) {
int err = ::fseek(f, (long)byteCount, SEEK_SET);
return err == 0;
« no previous file with comments | « src/core/SkStream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698