Files
MapLibreParticleLab/include/mbgl/style/image.hpp
John Firebaugh 9dfc2d924d [core] Collection-level immutability
Introduce a second level of immutability, over each of the collections held by a style: sources, images, and layers. Tracking immutability at this level allows us to short-circuit significant portions of the RenderStyle update logic via a simple equality check, greatly improving performance.
2017-06-05 19:38:08 -07:00

32 lines
621 B
C++

#pragma once
#include <mbgl/util/image.hpp>
#include <mbgl/util/immutable.hpp>
#include <string>
namespace mbgl {
namespace style {
class Image {
public:
Image(std::string id, PremultipliedImage&&, float pixelRatio, bool sdf = false);
Image(const Image&);
std::string getID() const;
const PremultipliedImage& getImage() const;
// Pixel ratio of the sprite image.
float getPixelRatio() const;
// Whether this image should be interpreted as a signed distance field icon.
bool isSdf() const;
class Impl;
Immutable<Impl> baseImpl;
};
} // namespace style
} // namespace mbgl