mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
Move texture registry ownership to platform view (#4348)
* Move texture registry ownership to platform view This enables the texture registry to survive activity pause on Android.
This commit is contained in:
@@ -161,4 +161,8 @@ void GPURasterizer::NotifyNextFrameOnce() {
|
||||
}
|
||||
}
|
||||
|
||||
void GPURasterizer::SetTextureRegistry(flow::TextureRegistry* textureRegistry) {
|
||||
compositor_context_.SetTextureRegistry(std::move(textureRegistry));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
|
||||
@@ -42,6 +42,8 @@ class GPURasterizer : public Rasterizer {
|
||||
// Set a callback to be called once when the next frame is drawn.
|
||||
void AddNextFrameCallback(fxl::Closure nextFrameCallback) override;
|
||||
|
||||
void SetTextureRegistry(flow::TextureRegistry* textureRegistry) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<Surface> surface_;
|
||||
flow::CompositorContext compositor_context_;
|
||||
|
||||
Reference in New Issue
Block a user