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

Unified Diff: src/core/SkData.cpp

Issue 1173173007: remove dead guarded code for legacy SkData proc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « include/core/SkData.h ('k') | tests/DataRefTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkData.cpp
diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp
index 09d7a5de98d8d4bbacbe9a4677a7ce59cb229d09..4590e3bafe1c75318d529dfe64e3d115e5041f2f 100644
--- a/src/core/SkData.cpp
+++ b/src/core/SkData.cpp
@@ -12,19 +12,11 @@
#include "SkStream.h"
#include "SkWriteBuffer.h"
-#ifdef SK_SUPPORT_LEGACY_DATARELEASEPROC_PARAMS
-SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context,
- LegacyReleaseProc legacyProc) {
-#else
SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) {
-#endif
fPtr = const_cast<void*>(ptr);
fSize = size;
fReleaseProc = proc;
fReleaseProcContext = context;
-#ifdef SK_SUPPORT_LEGACY_DATARELEASEPROC_PARAMS
- fLegacyReleaseProc = legacyProc;
-#endif
}
// This constructor means we are inline with our fPtr's contents. Thus we set fPtr
@@ -36,20 +28,12 @@ SkData::SkData(size_t size) {
fSize = size;
fReleaseProc = NULL;
fReleaseProcContext = NULL;
-#ifdef SK_SUPPORT_LEGACY_DATARELEASEPROC_PARAMS
- fLegacyReleaseProc = NULL;
-#endif
}
SkData::~SkData() {
if (fReleaseProc) {
fReleaseProc(fPtr, fReleaseProcContext);
}
-#ifdef SK_SUPPORT_LEGACY_DATARELEASEPROC_PARAMS
- if (fLegacyReleaseProc) {
- fLegacyReleaseProc(fPtr, fSize, fReleaseProcContext);
- }
-#endif
}
bool SkData::equals(const SkData* other) const {
@@ -128,12 +112,6 @@ SkData* SkData::NewWithProc(const void* ptr, size_t length, ReleaseProc proc, vo
return new SkData(ptr, length, proc, context);
}
-#ifdef SK_SUPPORT_LEGACY_DATARELEASEPROC_PARAMS
-SkData* SkData::NewWithProc(const void* ptr, size_t length, LegacyReleaseProc proc, void* ctx) {
- return new SkData(ptr, length, NULL, ctx, proc);
-}
-#endif
-
// assumes fPtr was allocated with sk_fmmap
static void sk_mmap_releaseproc(const void* addr, void* ctx) {
size_t length = reinterpret_cast<size_t>(ctx);
« no previous file with comments | « include/core/SkData.h ('k') | tests/DataRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698