Replace DrawableSearcher with scoped drawable resolution:

Add a scene-owned UI::DrawableResolver for resolving file, data, HTTP, and
named drawable references through each UISceneNode's current resource scope.

Move generic texture, atlas region, nine-patch, and sprite lookup into
Graphics::ResourceScope, preserving drawable resolution for pure Graphics
consumers without introducing a UI dependency.

Migrate UI images, sprites, menus, CSS parsing, and tests to the new resolver.
Resolve CSS icons through the requesting node's scene instead of the global
scene, preserving embedded-scene isolation.

Remove the obsolete DrawableSearcher API and update platform project manifests,
tests, and the shared-resource architecture plan.
This commit is contained in:
Martín Lucas Golini
2026-07-21 23:50:58 -03:00
parent b5efd6d709
commit f7dba042df
21 changed files with 353 additions and 326 deletions

View File

@@ -1,7 +1,6 @@
#include "compareimages.hpp"
#include "utest.hpp"
#include <eepp/graphics/drawablesearcher.hpp>
#include <eepp/graphics/fontfamily.hpp>
#include <eepp/graphics/fontmanager.hpp>
#include <eepp/graphics/fonttruetype.hpp>
@@ -5142,8 +5141,7 @@ UTEST( UIHTML, DeferredFileImageReusesCachedTexture ) {
sceneNode->setURI( URI( "file://" + processPath ) );
URI imageURI = sceneNode->solveRelativePath( URI( "../assets/icon/ee.png" ) );
ASSERT_TRUE( FileSystem::fileExists( imageURI.getFSPath() ) );
DrawablePtr cached = DrawableSearcher::searchByName(
imageURI.toString(), false, sceneNode->getReferer(), sceneNode->getResourceScope().get() );
DrawablePtr cached = sceneNode->getDrawableResolver().resolve( imageURI.toString() );
ASSERT_TRUE( cached != nullptr );
sceneNode->loadLayoutFromString( HTMLFormatter::HTMLtoXML( R"html(