#pragma once #include #include #include #include namespace mbgl { class RasterBucket; class ImageSourceRenderData { public: ImageSourceRenderData(std::shared_ptr bucket_, std::vector matrices_) : bucket(std::move(bucket_)), matrices(std::move(matrices_)) {} std::shared_ptr bucket; std::vector matrices; }; class RenderImageSource final : public RenderSource { public: explicit RenderImageSource(Immutable); ~RenderImageSource() override; bool isLoaded() const final; void upload(gfx::UploadPass&) final; void prepare(const SourcePrepareParameters&) final; void finishRender(PaintParameters&) final; void updateFadingTiles() final {} bool hasFadingTiles() const final { return false; } void update(Immutable, const std::vector>&, bool needsRendering, bool needsRelayout, const TileParameters&) final; std::vector> getRenderTiles() final { return {}; } const ImageSourceRenderData* getImageRenderData() const override { return renderData.get(); } std::unordered_map> queryRenderedFeatures(const ScreenLineString& geometry, const TransformState& transformState, const std::vector& layers, const RenderedQueryOptions& options, const mat4& projMatrix) const final; std::vector querySourceFeatures(const SourceQueryOptions&) const final; void reduceMemoryUse() final { } void dumpDebugLogs() const final; private: friend class RenderRasterLayer; const style::ImageSource::Impl& impl() const; std::shared_ptr bucket; std::unique_ptr renderData; std::vector tileIds; }; } // namespace mbgl