소스 검색

Remove property counter (performance)

Michael Ragazzon 6 년 전
부모
커밋
c908628adc
2개의 변경된 파일0개의 추가작업 그리고 14개의 파일을 삭제
  1. 0 10
      Source/Core/ElementStyle.cpp
  2. 0 4
      Source/Core/ElementStyle.h

+ 0 - 10
Source/Core/ElementStyle.cpp

@@ -72,12 +72,6 @@ ElementStyle::~ElementStyle()
 	delete cache;
 }
 
-static PropCounter prop_counter;
-
-PropCounter &ElementStyle::GetPropCounter()
-{
-	return prop_counter;
-}
 
 // Returns the element's definition, updating if necessary.
 const ElementDefinition* ElementStyle::GetDefinition()
@@ -113,10 +107,6 @@ const Property* ElementStyle::GetLocalProperty(const String& name, PropertyDicti
 // Returns one of this element's properties.
 const Property* ElementStyle::GetProperty(const String& name, Element* element, PropertyDictionary* local_properties, ElementDefinition* definition, const PseudoClassList& pseudo_classes)
 {
-	if (prop_counter.find(name) == prop_counter.end())
-		prop_counter[name] = 0;
-	prop_counter[name] = prop_counter[name] + 1;
-	
 	const Property* local_property = GetLocalProperty(name, local_properties, definition, pseudo_classes);
 	if (local_property != NULL)
 		return local_property;

+ 0 - 4
Source/Core/ElementStyle.h

@@ -36,8 +36,6 @@ namespace Core {
 
 class ElementStyleCache;
 
-typedef std::unordered_map<String, int> PropCounter;
-
 /**
 	Manages an element's style and property information.
 	@author Lloyd Weehuizen
@@ -215,8 +213,6 @@ public:
 	/// Returns 'transform-origin-z' property value from element's style or local cache.
 	const Property *GetTransformOriginZ();
 
-	static PropCounter &GetPropCounter();
-
 private:
 	// Sets a single property as dirty.
 	void DirtyProperty(const String& property);