diff options
-rw-r--r-- | include/mbgl/gl/custom_layer.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/gl/custom_layer.cpp | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/mbgl/gl/custom_layer.hpp b/include/mbgl/gl/custom_layer.hpp index 5dce484980..acbd2886b7 100644 --- a/include/mbgl/gl/custom_layer.hpp +++ b/include/mbgl/gl/custom_layer.hpp @@ -20,6 +20,9 @@ struct CustomLayerRenderParameters { double pitch; double fieldOfView; std::array<double, 16> projectionMatrix; + + bool operator==(const CustomLayerRenderParameters&) const; + bool operator!=(const CustomLayerRenderParameters&) const; }; class CustomLayerHost { diff --git a/src/mbgl/gl/custom_layer.cpp b/src/mbgl/gl/custom_layer.cpp index 456467e904..04b4395e27 100644 --- a/src/mbgl/gl/custom_layer.cpp +++ b/src/mbgl/gl/custom_layer.cpp @@ -55,5 +55,13 @@ const LayerTypeInfo* CustomLayer::Impl::staticTypeInfo() noexcept { return &typeInfoCustom; } +bool CustomLayerRenderParameters::operator==(const CustomLayerRenderParameters& o) const { + return projectionMatrix == o.projectionMatrix; +} + +bool CustomLayerRenderParameters::operator!=(const CustomLayerRenderParameters& o) const { + return !(*this == o); +} + } // namespace style } // namespace mbgl |