mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-22 13:01:05 +03:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user