Files
MapLibreParticleLab/test/fixtures/mock_view.hpp
Konstantin Käfer 675ddddee7 Make pixelRatio constant across a Map object lifetime
also moves framebuffer size out of TransformState into its own object
2015-07-08 10:40:05 +02:00

29 lines
592 B
C++

#ifndef TEST_FIXTURES_MOCK_VIEW
#define TEST_FIXTURES_MOCK_VIEW
#include <mbgl/map/view.hpp>
#include <array>
namespace mbgl {
class MockView : public View {
public:
MockView() = default;
// View implementation.
float getPixelRatio() const { return 1; }
std::array<uint16_t, 2> getSize() const { return {{ 0, 0 }}; }
std::array<uint16_t, 2> getFramebufferSize() const { return {{ 0, 0 }}; }
void activate() override {};
void deactivate() override {};
void notify() override {};
void invalidate() override {}
void swap() override {}
};
}
#endif