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

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

Issue 15298009: Change SkStream. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Adjustments Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « gyp/ports.gyp ('k') | include/core/SkStream.h » ('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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 // TODO: add unittests for all these operations 10 // TODO: add unittests for all these operations
(...skipping 30 matching lines...) Expand all
41 */ 41 */
42 bool sk_frewind(SkFILE*); 42 bool sk_frewind(SkFILE*);
43 43
44 size_t sk_fread(void* buffer, size_t byteCount, SkFILE*); 44 size_t sk_fread(void* buffer, size_t byteCount, SkFILE*);
45 size_t sk_fwrite(const void* buffer, size_t byteCount, SkFILE*); 45 size_t sk_fwrite(const void* buffer, size_t byteCount, SkFILE*);
46 46
47 char* sk_fgets(char* str, int size, SkFILE* f); 47 char* sk_fgets(char* str, int size, SkFILE* f);
48 48
49 void sk_fflush(SkFILE*); 49 void sk_fflush(SkFILE*);
50 50
51 int sk_fseek(SkFILE*, size_t, int); 51 bool sk_fseek(SkFILE*, size_t);
52 bool sk_fmove(SkFILE*, long);
52 size_t sk_ftell(SkFILE*); 53 size_t sk_ftell(SkFILE*);
53 54
55 /** Maps a file into memory. Returns the address and length on success, NULL oth erwise.
56 * The mapping is read only.
57 */
58 void* sk_fmmap(SkFILE* f, size_t* length);
59
60 /** Unmaps a file previously mapped by sk_fmmap.
61 * The length parameter must be the same as returned from sk_fmmap.
62 */
63 void sk_fmunmap(const void* addr, size_t length);
64
65 /** Returns true if the two point at the exact same filesystem object. */
66 bool sk_fidentical(SkFILE* a, SkFILE* b);
67
54 // Returns true if something (file, directory, ???) exists at this path. 68 // Returns true if something (file, directory, ???) exists at this path.
55 bool sk_exists(const char *path); 69 bool sk_exists(const char *path);
56 70
57 // Returns true if a directory exists at this path. 71 // Returns true if a directory exists at this path.
58 bool sk_isdir(const char *path); 72 bool sk_isdir(const char *path);
59 73
60 // Have we reached the end of the file? 74 // Have we reached the end of the file?
61 int sk_feof(SkFILE *); 75 int sk_feof(SkFILE *);
62 76
63 77
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 { 113 {
100 sk_free(fStr); 114 sk_free(fStr);
101 } 115 }
102 const uint16_t* get() const { return fStr; } 116 const uint16_t* get() const { return fStr; }
103 117
104 private: 118 private:
105 uint16_t* fStr; 119 uint16_t* fStr;
106 }; 120 };
107 121
108 #endif 122 #endif
OLDNEW
« no previous file with comments | « gyp/ports.gyp ('k') | include/core/SkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698