Trim gEntries down from 24K to 3K.
Today gCount maxes out at 66, so 128 seems like plenty of room for now. Change-Id: Id29d7a0232047d07a5ea7c43e4f2d874f055165a Reviewed-on: https://skia-review.googlesource.com/19740 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
This commit is contained in:
parent
0c182fc77e
commit
741d7261f2
@ -48,8 +48,6 @@ void SkRefCntSet::decPtr(void* ptr) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define MAX_ENTRY_COUNT 1024
|
||||
|
||||
struct Entry {
|
||||
const char* fName;
|
||||
SkFlattenable::Factory fFactory;
|
||||
@ -57,12 +55,12 @@ struct Entry {
|
||||
};
|
||||
|
||||
static int gCount = 0;
|
||||
static Entry gEntries[MAX_ENTRY_COUNT];
|
||||
static Entry gEntries[128];
|
||||
|
||||
void SkFlattenable::Register(const char name[], Factory factory, SkFlattenable::Type type) {
|
||||
SkASSERT(name);
|
||||
SkASSERT(factory);
|
||||
SkASSERT(gCount < MAX_ENTRY_COUNT);
|
||||
SkASSERT(gCount < (int)SK_ARRAY_COUNT(gEntries));
|
||||
|
||||
gEntries[gCount].fName = name;
|
||||
gEntries[gCount].fFactory = factory;
|
||||
|
Loading…
Reference in New Issue
Block a user