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

Unified Diff: src/core/SkMallocPixelRef.cpp

Issue 197873039: Hide SkMallocPixelRef class befind SkPixelRef factory functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet 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 side-by-side diff with in-line comments
Download patch
« include/core/SkPixelRef.h ('K') | « include/core/SkPixelRef.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMallocPixelRef.cpp
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
index aa7c4f745cd5e809cb62f8c8f26c455a1197a77f..fb046c6308839f91dd3c5d091fc06eea6fbb76c3 100644
--- a/src/core/SkMallocPixelRef.cpp
+++ b/src/core/SkMallocPixelRef.cpp
@@ -49,6 +49,14 @@ SkMallocPixelRef* SkMallocPixelRef::NewDirect(const SkImageInfo& info,
(info, addr, rowBytes, ctable, NULL, NULL));
}
+
+SkPixelRef* SkPixelRef::NewPrelockedAllocate(
+ const SkImageInfo& info,
+ size_t rowBytes,
+ SkColorTable* ctable) {
+ return SkMallocPixelRef::NewAllocate(info, rowBytes, ctable);
+}
+
SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info,
size_t requestedRowBytes,
SkColorTable* ctable) {
@@ -88,6 +96,17 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info,
sk_free_releaseproc, NULL));
}
+SkPixelRef* SkPixelRef::NewPrelockedDirectWithProc(
+ const SkImageInfo& info,
+ size_t rowBytes,
+ SkColorTable* ctable,
+ void* addr,
+ void (*releaseProc)(void* addr, void* context),
+ void* releaseProcContext) {
+ return SkMallocPixelRef::NewWithProc(
+ info, rowBytes, ctable, addr, releaseProc, releaseProcContext);
+}
+
SkMallocPixelRef* SkMallocPixelRef::NewWithProc(const SkImageInfo& info,
size_t rowBytes,
SkColorTable* ctable,
@@ -105,6 +124,15 @@ static void sk_data_releaseproc(void*, void* dataPtr) {
(static_cast<SkData*>(dataPtr))->unref();
}
+SkPixelRef* SkPixelRef::NewPrelockedWithData(
+ const SkImageInfo& info,
+ size_t rowBytes,
+ SkColorTable* ctable,
+ SkData* data,
+ size_t offset) {
+ return SkMallocPixelRef::NewWithData(info, rowBytes, ctable, data, offset);
+}
+
SkMallocPixelRef* SkMallocPixelRef::NewWithData(const SkImageInfo& info,
size_t rowBytes,
SkColorTable* ctable,
« include/core/SkPixelRef.h ('K') | « include/core/SkPixelRef.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698