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

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

Issue 185263012: DM: read image files without an extra copy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: three-lnies Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « dm/DMWriteTask.cpp ('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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 public: 356 public:
357 SK_DECLARE_INST_COUNT(SkFILEWStream) 357 SK_DECLARE_INST_COUNT(SkFILEWStream)
358 358
359 SkFILEWStream(const char path[]); 359 SkFILEWStream(const char path[]);
360 virtual ~SkFILEWStream(); 360 virtual ~SkFILEWStream();
361 361
362 /** Returns true if the current path could be opened. 362 /** Returns true if the current path could be opened.
363 */ 363 */
364 bool isValid() const { return fFILE != NULL; } 364 bool isValid() const { return fFILE != NULL; }
365 365
366 size_t bytesWritten() const;
reed1 2014/03/05 13:23:46 We have this on several WStreams. I wonder if its
366 virtual bool write(const void* buffer, size_t size) SK_OVERRIDE; 367 virtual bool write(const void* buffer, size_t size) SK_OVERRIDE;
367 virtual void flush() SK_OVERRIDE; 368 virtual void flush() SK_OVERRIDE;
368 369
369 private: 370 private:
370 SkFILE* fFILE; 371 SkFILE* fFILE;
371 372
372 typedef SkWStream INHERITED; 373 typedef SkWStream INHERITED;
373 }; 374 };
374 375
375 class SkMemoryWStream : public SkWStream { 376 class SkMemoryWStream : public SkWStream {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 virtual void newline() SK_OVERRIDE; 445 virtual void newline() SK_OVERRIDE;
445 446
446 private: 447 private:
447 typedef SkWStream INHERITED; 448 typedef SkWStream INHERITED;
448 }; 449 };
449 450
450 // for now 451 // for now
451 typedef SkFILEStream SkURLStream; 452 typedef SkFILEStream SkURLStream;
452 453
453 #endif 454 #endif
OLDNEW
« no previous file with comments | « dm/DMWriteTask.cpp ('k') | src/core/SkStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698