Merge branch 'master' of www.swiftcoder.nl:git/experimental/cpp/screensaver

This commit is contained in:
Bob Polis 2020-10-29 09:19:29 +01:00
commit 748ab7efac
2 changed files with 2 additions and 14 deletions

View File

@ -14,20 +14,14 @@ class RectSaver : public ScreensaverPlugin {
RectSaver() = default;
~RectSaver() = default;
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
void draw_frame() override;
int fps() const override;
void draw_frame() override;
};
ScreensaverPlugin* create_instance() {
return new RectSaver;
}
void RectSaver::setup(cairo_t* context, const cairo_rectangle_t& rect) {
ScreensaverPlugin::setup(context, rect);
make_black();
}
int RectSaver::fps() const {
return 2;
}

View File

@ -14,9 +14,8 @@ class Skembo : public ScreensaverPlugin {
Skembo() = default;
~Skembo() = default;
void setup(cairo_t* context, const cairo_rectangle_t& rect) override;
void draw_frame() override;
int fps() const override;
void draw_frame() override;
private:
double _hue {0};
@ -26,11 +25,6 @@ ScreensaverPlugin* create_instance() {
return new Skembo;
}
void Skembo::setup(cairo_t* context, const cairo_rectangle_t& rect) {
ScreensaverPlugin::setup(context, rect);
make_black();
}
int Skembo::fps() const {
return 40;
}