From 741d7261f2eb1ab74d5a7c21319587206032f900 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 13 Jun 2017 16:35:32 -0400 Subject: [PATCH] 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 Reviewed-by: Mike Reed --- src/core/SkFlattenable.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp index c759a1ab38..e89dae5c76 100644 --- a/src/core/SkFlattenable.cpp +++ b/src/core/SkFlattenable.cpp @@ -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;