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:
Sigurd Meldgaard
2017-11-22 09:55:45 +01:00
committed by GitHub
parent fbd384329b
commit e58764fbe0
9 changed files with 27 additions and 6 deletions
+4
View File
@@ -161,4 +161,8 @@ void GPURasterizer::NotifyNextFrameOnce() {
}
}
void GPURasterizer::SetTextureRegistry(flow::TextureRegistry* textureRegistry) {
compositor_context_.SetTextureRegistry(std::move(textureRegistry));
}
} // namespace shell
+2
View File
@@ -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_;