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

Unified Diff: src/core/SkFlattenable.cpp

Issue 1361323002: Eliminate some clutter in SkFlattenable (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Remove unused SkLayerDrawLooper::fTopRec Created 5 years, 3 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/effects/SkLayerDrawLooper.h ('k') | src/effects/SkLayerDrawLooper.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 87e720e95f1b01008c85f332279295bf00add736..c759a1ab388951b1bb305b80ac283712ddcd111b 100644
--- a/src/core/SkFlattenable.cpp
+++ b/src/core/SkFlattenable.cpp
@@ -56,19 +56,12 @@ struct Entry {
SkFlattenable::Type fType;
};
-static int gCount;
+static int gCount = 0;
static Entry gEntries[MAX_ENTRY_COUNT];
void SkFlattenable::Register(const char name[], Factory factory, SkFlattenable::Type type) {
SkASSERT(name);
SkASSERT(factory);
-
- static bool gOnce = false;
- if (!gOnce) {
- gCount = 0;
- gOnce = true;
- }
-
SkASSERT(gCount < MAX_ENTRY_COUNT);
gEntries[gCount].fName = name;
« no previous file with comments | « include/effects/SkLayerDrawLooper.h ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698