diff options
author | Robin Gareus <robin@gareus.org> | 2019-12-26 23:55:44 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-12-27 19:35:02 +0100 |
commit | 2edbda252619b6906e463c07ba2ea57422ccfa70 (patch) | |
tree | c62866e755f02906b149cb8f44b2beb4f65a6e79 /libs/canvas/canvas | |
parent | c3ab63a2eadece16ab5b5494d5815c147c6bd146 (diff) |
Replace explicit image-surface with cairo pattern/group
For MacOS/X this is equivalent, rendering happens using a
CGBitmapContext + image-surface. Windows and Linux needs profiling
for respective equivalent surfaces.
Diffstat (limited to 'libs/canvas/canvas')
-rw-r--r-- | libs/canvas/canvas/canvas.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h index 30ec3d0786..f0dfa09bf7 100644 --- a/libs/canvas/canvas/canvas.h +++ b/libs/canvas/canvas/canvas.h @@ -173,6 +173,11 @@ public: virtual Glib::RefPtr<Pango::Context> get_pango_context() = 0; + /** Redirect drawing to an intermediate (image) surface. + * see also https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-push-group + */ + void use_intermediate_surface (bool yn = true); + protected: Root _root; Gtkmm2ext::Color _bg_color; @@ -187,7 +192,7 @@ protected: std::list<ScrollGroup*> scrollers; - bool _use_image_surface; + bool _use_intermediate_surface; }; /** A canvas which renders onto a GTK EventBox */ @@ -264,8 +269,6 @@ private: void item_shown_or_hidden (Item *); bool send_leave_event (Item const *, double, double) const; - Cairo::RefPtr<Cairo::Surface> canvas_image; - /** Item currently chosen for event delivery based on pointer position */ Item * _current_item; /** Item pending as _current_item */ |