core: Defer WebGPU dynamic texture wrapper creation (#4369)

This commit is contained in:
Sargun Vohra
2026-07-01 05:16:51 -07:00
committed by GitHub
parent 887e6021e6
commit 027b9340c3
4 changed files with 41 additions and 6 deletions

View File

@@ -65,8 +65,11 @@ public:
virtual bool removeTexture(const TextureHandle& texHandle);
protected:
DynamicTexture(Size size, TexturePixelType pixelType);
mapbox::ShelfPack shelfPack;
Texture2DPtr texture;
TexturePixelType pixelFormat;
int numTextures = 0;
std::mutex mutex;
};

View File

@@ -19,6 +19,9 @@ public:
std::unordered_map<gfx::TextureHandle, std::unique_ptr<uint8_t[]>, gfx::TextureHandle::Hasher>;
private:
Context& context;
Size size;
gfx::TexturePixelType pixelType;
bool deferredCreation = false;
ImagesToUpload imagesToUpload;
};