mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Add Canvas::get_last_render_start_timestamp method
This commit is contained in:
parent
8538ba35fe
commit
ab13e87ec2
2 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,7 @@ uint32_t Canvas::tooltip_timeout_msecs = 750;
|
||||||
Canvas::Canvas ()
|
Canvas::Canvas ()
|
||||||
: _root (this)
|
: _root (this)
|
||||||
, _bg_color (rgba_to_color (0, 1.0, 0.0, 1.0))
|
, _bg_color (rgba_to_color (0, 1.0, 0.0, 1.0))
|
||||||
|
, _last_render_start_timestamp(0)
|
||||||
{
|
{
|
||||||
set_epoch ();
|
set_epoch ();
|
||||||
}
|
}
|
||||||
|
|
@ -103,6 +104,8 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
||||||
{
|
{
|
||||||
PreRender (); // emit signal
|
PreRender (); // emit signal
|
||||||
|
|
||||||
|
_last_render_start_timestamp = g_get_monotonic_time();
|
||||||
|
|
||||||
#ifdef CANVAS_DEBUG
|
#ifdef CANVAS_DEBUG
|
||||||
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
|
if (DEBUG_ENABLED(PBD::DEBUG::CanvasRender)) {
|
||||||
cerr << this << " RENDER: " << area << endl;
|
cerr << this << " RENDER: " << area << endl;
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,8 @@ public:
|
||||||
|
|
||||||
void prepare_for_render (Rect const &) const;
|
void prepare_for_render (Rect const &) const;
|
||||||
|
|
||||||
|
gint64 get_last_render_start_timestamp () const { return _last_render_start_timestamp; }
|
||||||
|
|
||||||
/** @return root group */
|
/** @return root group */
|
||||||
Item* root () {
|
Item* root () {
|
||||||
return &_root;
|
return &_root;
|
||||||
|
|
@ -169,6 +171,8 @@ protected:
|
||||||
Root _root;
|
Root _root;
|
||||||
Color _bg_color;
|
Color _bg_color;
|
||||||
|
|
||||||
|
mutable gint64 _last_render_start_timestamp;
|
||||||
|
|
||||||
static uint32_t tooltip_timeout_msecs;
|
static uint32_t tooltip_timeout_msecs;
|
||||||
|
|
||||||
void queue_draw_item_area (Item *, Rect);
|
void queue_draw_item_area (Item *, Rect);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue