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

Unified Diff: platform_tools/android/gyp_gen/vars_dict_lib.py

Issue 198063002: Updates to Android.mk generation. (Closed) Base URL: https://skia.googlesource.com/skia.git@android_mk
Patch Set: Add a comment explaining the motivation of OrderedSet. Created 6 years, 9 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
Index: platform_tools/android/gyp_gen/vars_dict_lib.py
diff --git a/platform_tools/android/gyp_gen/vars_dict_lib.py b/platform_tools/android/gyp_gen/vars_dict_lib.py
index eedb8a36b9c7e5adcef4e774068147a7673c2811..a4ef67e8b78f44c8f03224e75ae64dd776cbe02f 100644
--- a/platform_tools/android/gyp_gen/vars_dict_lib.py
+++ b/platform_tools/android/gyp_gen/vars_dict_lib.py
@@ -8,6 +8,10 @@
import collections
import types
+# The goal of this class is to store a set of unique items in the order in
+# which they are inserted. This is important for the final makefile, where
+# we want to make sure the image decoders are in a particular order. See
+# images.gyp for more information.
class OrderedSet(object):
"""
Ordered set of unique items that supports addition and removal.
@@ -57,6 +61,12 @@ class OrderedSet(object):
"""
return self.__li[index]
+ def reset(self):
+ """
+ Reset to empty.
+ """
+ self.__li = []
+
VAR_NAMES = ['LOCAL_CFLAGS',
'LOCAL_CPPFLAGS',
'LOCAL_SRC_FILES',
@@ -64,6 +74,7 @@ VAR_NAMES = ['LOCAL_CFLAGS',
'LOCAL_STATIC_LIBRARIES',
'LOCAL_C_INCLUDES',
'LOCAL_EXPORT_C_INCLUDE_DIRS',
+ 'DEFINES',
'KNOWN_TARGETS']
class VarsDict(collections.namedtuple('VarsDict', VAR_NAMES)):
« no previous file with comments | « platform_tools/android/gyp_gen/makefile_writer.py ('k') | platform_tools/android/tests/expectations/Android.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698