Jelajahi Sumber

Remove geometry database

Michael Ragazzon 6 tahun lalu
induk
melakukan
c49644b46a

+ 0 - 2
Cmake/FileList.cmake

@@ -47,7 +47,6 @@ set(Core_HDR_FILES
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontFaceHandle.h
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontFamily.h
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/precompiled.h
-    ${PROJECT_SOURCE_DIR}/Source/Core/GeometryDatabase.h
     ${PROJECT_SOURCE_DIR}/Source/Core/IdNameMap.h
     ${PROJECT_SOURCE_DIR}/Source/Core/LayoutBlockBox.h
     ${PROJECT_SOURCE_DIR}/Source/Core/LayoutBlockBoxSpace.h
@@ -273,7 +272,6 @@ set(Core_SRC_FILES
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontFamily.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/FreeType/FontProvider.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/Geometry.cpp
-    ${PROJECT_SOURCE_DIR}/Source/Core/GeometryDatabase.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/GeometryUtilities.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/LayoutBlockBox.cpp
     ${PROJECT_SOURCE_DIR}/Source/Core/LayoutBlockBoxSpace.cpp

+ 0 - 2
Include/RmlUi/Core/Core.h

@@ -161,8 +161,6 @@ RMLUICORE_API void RegisterPlugin(Plugin* plugin);
 /// @return The EventId of the newly created type, or existing type if 'type' is an internal type.
 RMLUICORE_API EventId RegisterEventType(const String& type, bool interruptible, bool bubbles, DefaultActionPhase default_action_phase = DefaultActionPhase::None);
 
-/// Forces all compiled geometry handles generated by RmlUi to be released.
-RMLUICORE_API void ReleaseCompiledGeometries();
 /// Forces all texture handles loaded and generated by RmlUi to be released.
 RMLUICORE_API void ReleaseTextures();
 

+ 0 - 7
Source/Core/Core.cpp

@@ -30,7 +30,6 @@
 #include "../../Include/RmlUi/Core.h"
 #include "EventSpecification.h"
 #include "FileInterfaceDefault.h"
-#include "GeometryDatabase.h"
 #include "PluginRegistry.h"
 #include "StyleSheetFactory.h"
 #include "TemplateCache.h"
@@ -282,12 +281,6 @@ EventId RegisterEventType(const String& type, bool interruptible, bool bubbles,
 	return EventSpecificationInterface::InsertOrReplaceCustom(type, interruptible, bubbles, default_action_phase);
 }
 
-// Forces all compiled geometry handles generated by RmlUi to be released.
-void ReleaseCompiledGeometries()
-{
-	GeometryDatabase::ReleaseGeometries();
-}
-
 // Forces all texture handles loaded and generated by RmlUi to be released.
 void ReleaseTextures()
 {

+ 0 - 7
Source/Core/Geometry.cpp

@@ -29,7 +29,6 @@
 #include "precompiled.h"
 #include "../../Include/RmlUi/Core/Geometry.h"
 #include "../../Include/RmlUi/Core.h"
-#include "GeometryDatabase.h"
 
 namespace Rml {
 namespace Core {
@@ -42,8 +41,6 @@ Geometry::Geometry(Element* _host_element)
 	host_element = _host_element;
 	host_context = nullptr;
 
-	GeometryDatabase::AddGeometry(this);
-
 	texture = nullptr;
 
 	fixed_texcoords = false;
@@ -56,8 +53,6 @@ Geometry::Geometry(Context* _host_context)
 	host_element = nullptr;
 	host_context = _host_context;
 
-	GeometryDatabase::AddGeometry(this);
-
 	texture = nullptr;
 
 	fixed_texcoords = false;
@@ -67,8 +62,6 @@ Geometry::Geometry(Context* _host_context)
 
 Geometry::~Geometry()
 {
-	GeometryDatabase::RemoveGeometry(this);
-
 	Release();
 }
 

+ 0 - 60
Source/Core/GeometryDatabase.cpp

@@ -1,60 +0,0 @@
-/*
- * This source file is part of RmlUi, the HTML/CSS Interface Middleware
- *
- * For the latest information, see http://github.com/mikke89/RmlUi
- *
- * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
- * Copyright (c) 2019 The RmlUi Team, and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-
-#include "precompiled.h"
-#include "GeometryDatabase.h"
-#include "../../Include/RmlUi/Core/Geometry.h"
-
-namespace Rml {
-namespace Core {
-
-typedef std::unordered_set< Geometry* > GeometrySet;
-//static GeometrySet geometries;
-
-// Adds a geometry to the database.
-void GeometryDatabase::AddGeometry(Geometry* geometry)
-{
-	//geometries.insert(geometry);
-}
-
-// Removes a geometry from the database.
-void GeometryDatabase::RemoveGeometry(Geometry* geometry)
-{
-	//geometries.erase(geometry);
-}
-
-// Releases all compiled geometries.
-void GeometryDatabase::ReleaseGeometries()
-{
-	Log::Message(Log::LT_WARNING, "ReleaseGeometry not currently implemented for performance reasons.");
-	//for (GeometrySet::iterator i = geometries.begin(); i != geometries.end(); ++i)
-	//	(*i)->Release();
-}
-
-}
-}

+ 0 - 60
Source/Core/GeometryDatabase.h

@@ -1,60 +0,0 @@
-/*
- * This source file is part of RmlUi, the HTML/CSS Interface Middleware
- *
- * For the latest information, see http://github.com/mikke89/RmlUi
- *
- * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
- * Copyright (c) 2019 The RmlUi Team, and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-
-#ifndef RMLUICOREGEOMETRYDATABASE_H
-#define RMLUICOREGEOMETRYDATABASE_H
-
-namespace Rml {
-namespace Core {
-
-class Geometry;
-
-/**
-	Stores a list of all active geometries.
-
-	@author Peter Curry
- */
-
-class GeometryDatabase
-{
-public:
-	/// Adds a geometry to the database.
-	/// @param[in] geometry The geometry to add.
-	static void AddGeometry(Geometry* geometry);
-	/// Removes a geometry from the database.
-	/// @param[in] geometry The geometry to remove.
-	static void RemoveGeometry(Geometry* geometry);
-
-	/// Releases all compiled geometries.
-	static void ReleaseGeometries();
-};
-
-}
-}
-
-#endif