#pragma once #include #include #include namespace dchat { class GtkGif : public Gif { public: GtkGif(StringView fileContent); virtual ~GtkGif(){} void draw(const Cairo::RefPtr &cairo, int width, int height, bool circularMask); protected: // Return false if texture creation failed bool createTexture(int width, int height) override; // Size of texture data is same as the size that the texture was created with (also same size returned by @getSize function) void updateTexture(void *textureData) override; private: Cairo::RefPtr surface; }; }