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

Side by Side Diff: include/core/SkStream.h

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 unified diff | Download patch
« no previous file with comments | « include/core/SkOSFile.h ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkStream_DEFINED 8 #ifndef SkStream_DEFINED
9 #define SkStream_DEFINED 9 #define SkStream_DEFINED
10 10
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 public: 353 public:
354 SkFILEWStream(const char path[]); 354 SkFILEWStream(const char path[]);
355 virtual ~SkFILEWStream(); 355 virtual ~SkFILEWStream();
356 356
357 /** Returns true if the current path could be opened. 357 /** Returns true if the current path could be opened.
358 */ 358 */
359 bool isValid() const { return fFILE != NULL; } 359 bool isValid() const { return fFILE != NULL; }
360 360
361 bool write(const void* buffer, size_t size) override; 361 bool write(const void* buffer, size_t size) override;
362 void flush() override; 362 void flush() override;
363 void fsync();
363 size_t bytesWritten() const override; 364 size_t bytesWritten() const override;
364 365
365 private: 366 private:
366 FILE* fFILE; 367 FILE* fFILE;
367 368
368 typedef SkWStream INHERITED; 369 typedef SkWStream INHERITED;
369 }; 370 };
370 371
371 class SkMemoryWStream : public SkWStream { 372 class SkMemoryWStream : public SkWStream {
372 public: 373 public:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 440
440 private: 441 private:
441 size_t fBytesWritten; 442 size_t fBytesWritten;
442 typedef SkWStream INHERITED; 443 typedef SkWStream INHERITED;
443 }; 444 };
444 445
445 // for now 446 // for now
446 typedef SkFILEStream SkURLStream; 447 typedef SkFILEStream SkURLStream;
447 448
448 #endif 449 #endif
OLDNEW
« no previous file with comments | « include/core/SkOSFile.h ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698