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

Side by Side Diff: trunk/include/core/SkData.h

Issue 12919013: move SK_MMAP_SUPPORT into SkPreConfig, so we can know about its availability (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « trunk/gyp/core.gypi ('k') | trunk/include/core/SkMMapStream.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 static SkData* NewWithProc(const void* data, size_t length, 82 static SkData* NewWithProc(const void* data, size_t length,
83 ReleaseProc proc, void* context); 83 ReleaseProc proc, void* context);
84 84
85 /** 85 /**
86 * Create a new dataref from a pointer allocated by malloc. The Data object 86 * Create a new dataref from a pointer allocated by malloc. The Data object
87 * takes ownership of that allocation, and will handling calling sk_free. 87 * takes ownership of that allocation, and will handling calling sk_free.
88 */ 88 */
89 static SkData* NewFromMalloc(const void* data, size_t length); 89 static SkData* NewFromMalloc(const void* data, size_t length);
90 90
91 /** 91 /**
92 * Create a new dataref from a pointer allocated by mmap. The Data object
93 * will handle calling munmap().
94 */
95 static SkData* NewFromMMap(const void* data, size_t length);
96
97 /**
92 * Create a new dataref using a subset of the data in the specified 98 * Create a new dataref using a subset of the data in the specified
93 * src dataref. 99 * src dataref.
94 */ 100 */
95 static SkData* NewSubset(const SkData* src, size_t offset, size_t length); 101 static SkData* NewSubset(const SkData* src, size_t offset, size_t length);
96 102
97 /** 103 /**
98 * Returns a new empty dataref (or a reference to a shared empty dataref). 104 * Returns a new empty dataref (or a reference to a shared empty dataref).
99 * New or shared, the caller must see that unref() is eventually called. 105 * New or shared, the caller must see that unref() is eventually called.
100 */ 106 */
101 static SkData* NewEmpty(); 107 static SkData* NewEmpty();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 153 }
148 154
149 SkData *operator->() const { return fRef; } 155 SkData *operator->() const { return fRef; }
150 operator SkData*() { return fRef; } 156 operator SkData*() { return fRef; }
151 157
152 private: 158 private:
153 SkData* fRef; 159 SkData* fRef;
154 }; 160 };
155 161
156 #endif 162 #endif
OLDNEW
« no previous file with comments | « trunk/gyp/core.gypi ('k') | trunk/include/core/SkMMapStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698