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

Unified Diff: src/core/SkFlattenable.cpp

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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 | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkFlattenableSerialization.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFlattenable.cpp
diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp
index c759a1ab388951b1bb305b80ac283712ddcd111b..506a7b14e7c5f3b96e08fc986a432476cb782dea 100644
--- a/src/core/SkFlattenable.cpp
+++ b/src/core/SkFlattenable.cpp
@@ -53,20 +53,18 @@ void SkRefCntSet::decPtr(void* ptr) {
struct Entry {
const char* fName;
SkFlattenable::Factory fFactory;
- SkFlattenable::Type fType;
};
static int gCount = 0;
static Entry gEntries[MAX_ENTRY_COUNT];
-void SkFlattenable::Register(const char name[], Factory factory, SkFlattenable::Type type) {
+void SkFlattenable::Register(const char name[], Factory factory) {
SkASSERT(name);
SkASSERT(factory);
SkASSERT(gCount < MAX_ENTRY_COUNT);
gEntries[gCount].fName = name;
gEntries[gCount].fFactory = factory;
- gEntries[gCount].fType = type;
gCount += 1;
}
@@ -94,22 +92,6 @@ SkFlattenable::Factory SkFlattenable::NameToFactory(const char name[]) {
return nullptr;
}
-bool SkFlattenable::NameToType(const char name[], SkFlattenable::Type* type) {
- SkASSERT(type);
- InitializeFlattenablesIfNeeded();
-#ifdef SK_DEBUG
- report_no_entries(__FUNCTION__);
-#endif
- const Entry* entries = gEntries;
- for (int i = gCount - 1; i >= 0; --i) {
- if (strcmp(entries[i].fName, name) == 0) {
- *type = entries[i].fType;
- return true;
- }
- }
- return false;
-}
-
const char* SkFlattenable::FactoryToName(Factory fact) {
InitializeFlattenablesIfNeeded();
#ifdef SK_DEBUG
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/core/SkFlattenableSerialization.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698