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

Unified Diff: include/core/SkDataTable.h

Issue 2211143002: Move to SkDataTable::MakeXXX and sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use bare pointer for global. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/ports/SkFontConfigInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDataTable.h
diff --git a/include/core/SkDataTable.h b/include/core/SkDataTable.h
index c9d915d2555e5455ddff3b112b345786b2a685f0..2ec2d0f2e2329f7ce81d93d32686f45de2095551 100644
--- a/include/core/SkDataTable.h
+++ b/include/core/SkDataTable.h
@@ -63,7 +63,7 @@ public:
typedef void (*FreeProc)(void* context);
- static SkDataTable* NewEmpty();
+ static sk_sp<SkDataTable> MakeEmpty();
/**
* Return a new DataTable that contains a copy of the data stored in each
@@ -74,8 +74,8 @@ public:
* ptrs[] array.
* @param count the number of array elements in ptrs[] and sizes[] to copy.
*/
- static SkDataTable* NewCopyArrays(const void * const * ptrs,
- const size_t sizes[], int count);
+ static sk_sp<SkDataTable> MakeCopyArrays(const void * const * ptrs,
+ const size_t sizes[], int count);
/**
* Return a new table that contains a copy of the data in array.
@@ -85,11 +85,10 @@ public:
* @param count the number of entries to be copied out of array. The number
* of bytes that will be copied is count * elemSize.
*/
- static SkDataTable* NewCopyArray(const void* array, size_t elemSize,
- int count);
+ static sk_sp<SkDataTable> MakeCopyArray(const void* array, size_t elemSize, int count);
- static SkDataTable* NewArrayProc(const void* array, size_t elemSize,
- int count, FreeProc proc, void* context);
+ static sk_sp<SkDataTable> MakeArrayProc(const void* array, size_t elemSize, int count,
+ FreeProc proc, void* context);
private:
struct Dir {
@@ -164,7 +163,7 @@ public:
* calls to append(). This call also clears any accumluated entries from
* this builder, so its count() will be 0 after this call.
*/
- SkDataTable* detachDataTable();
+ sk_sp<SkDataTable> detachDataTable();
private:
SkTDArray<SkDataTable::Dir> fDir;
« no previous file with comments | « no previous file | include/ports/SkFontConfigInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698