summaryrefslogtreecommitdiff
path: root/libs/canvas/canvas.cc
AgeCommit message (Collapse)Author
2020-03-25remove accumulated debug outputPaul Davis
2020-03-25more playhead-drag/click locate debuggingPaul Davis
2020-01-05Add a missing semicolonJohn Emmas
2020-01-04Return of image-surface backed canvas (windows graphics performance)Robin Gareus
This partially reverts 2edbda252619b. Using cairo-groups increases performance on MacOS, and retains retina-resolution. However it adds a performance regression for MS Windows graphics rendering. cairo-groups use a "similar" surface, not an image surface. Empirically this adds significant overhead compared to rendering using the CPU and using bitblt.
2019-12-27Replace explicit image-surface with cairo pattern/groupRobin Gareus
For MacOS/X this is equivalent, rendering happens using a CGBitmapContext + image-surface. Windows and Linux needs profiling for respective equivalent surfaces.
2019-12-27Allow for per-widget image-surface backingRobin Gareus
This is an intermediate commit, before replacing image surfaces with cairo pattern groups. The eventual goal is to reduce flickering and/or use CPU + bitblt for specific widgets instead of cairo graphics-cards accel. This also removes excessive calls to getenv() for every rendering operation.
2019-08-03Update canvas/UI lib GPL boilerplate and (C) from git logRobin Gareus
2017-07-18Fix NSGLView invalidationRobin Gareus
2017-07-17Clean up library inheritance (colors.h, utils.h)Robin Gareus
make libwidget independent of libcanvas. Confine basics to pbd and gtkmm2ext.
2017-06-26Add Canvas::get_microseconds_since_render_start() methodTim Mayberry
Initial use is for the WaveView class to determine whether on not to draw the waveform in the GUI thread.
2017-06-26Add Canvas::get_last_render_start_timestamp methodTim Mayberry
2017-06-26Only call Gtk::Widget::queue_draw_area in canvas when item and visible area ↵Tim Mayberry
intersect Refactor GtkCanvas::request_redraw to use Rect::intersection
2017-06-26Add an optional ArdourCanvas::Item::prepare_for_render interfaceTim Mayberry
Called when an item has requested a redraw and intersects with visible canvas area. Also add Canvas::prepare_for_render that will call Item::prepare_for_render for items visible on the canvas.
2017-06-26Add PreRender signal to the canvasTim Mayberry
Emitted by the canvas immediately before rendering.
2017-04-17Stop tooltip timeout when a canvas-widget or item is hidden.Robin Gareus
2017-03-21consolidate NSGLViewRobin Gareus
2017-03-21Allow to selectively use NSGLView CanvasRobin Gareus
Various GdkEvents are not yet handled correctly, eg. unpacking a widget from its container does not unmap it, nor are remaining widgets in the contained re-positioned (size allocation does not change, nor does the mapping). This affects eg. Mixbus Strips
2017-03-20Forward un/map events to NSGLViewRobin Gareus
2017-03-20Move NSGlView into libgtkmm2extRobin Gareus
This allows to re-use the concept with CairoWidget
2017-03-20Fix OSX canvas when used without openGL NSViewRobin Gareus
2017-03-20Use NSGLView with patched gdkRobin Gareus
Special case Ardour's Canvas NSView to forward gdk-events which are otherwise special-cased to read AU-views..
2017-03-19Prepare NSView/OpenGL Canvas (to speed up rendering on [mac]OS[X]Robin Gareus
This avoids Coregraphics (cairo_quartz_surface..) competely. The openGL texture bypasses CG's slow argb_image and CGSColorMask methods.
2017-03-17Snow White and the Pharaoh (mac rendering)Robin Gareus
Once upon a time there was a beautiful Apple tree in palace of GtkAnkhAmun in Cairo...
2017-03-17NO-OP: whitespaceRobin Gareus
2017-01-25yet another case of misplaced parentheses during the removal of ↵Paul Davis
boost::optional from Canvas
2017-01-25another case of misplaced parentheses during the removal of boost::optional ↵Paul Davis
from Canvas
2017-01-19remove use of boost::optional to define "undefined" Canvas::Rect, and use ↵Paul Davis
Rect::empty instead. This commit includes Rect::operator bool() which might be a candidate for removal in a future commit, in an attempt to make the meaning clearer
2016-10-13stop using gkd_pango_context_get() in ArdourCanvas::Canvas and require ↵Paul Davis
concrete instances to supply a Pango::Context; do this for GtkCanvas and Push2Canvas
2016-04-27canvas tooltips, tooRobin Gareus
2016-02-22Spelling correction patch from DebianAdrian Knoth
Patch taken (and forward-ported to HEAD) from <https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2015-11-02fix crash when cleaning up canvas itemsRobin Gareus
Backport from Mixbus. In Ardour this does not currently matter since there is no top-level canvas destroyed top-down. ... Editor::session_going_away MixerStrip::~MixerStrip MixbusStripCanvas::~MixbusStripCanvas ArdourCanvas::GtkCanvas::~GtkCanvas ArdourCanvas::Canvas::~Canvas ArdourCanvas::Root::~Root ArdourCanvas::Container::~Container ArdourCanvas::Item::~Item ArdourCanvas::Item::clear_items GtkCanvas::item_going_away() queue_draw_item_area() ..expose can take place async to garbage collection: crash in one of the items.
2015-10-06Include button number in canvas button press/release debug infoTim Mayberry
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-05-02gfx-card & performance testingRobin Gareus
2015-04-09Position (and size) canvas tooltips such that they better resemble Gtk tooltipsJohn Emmas
Mixbus in particular uses both types of tooltip so we might as well make them look the same. N.B. The appearance is fine now on Windows but needs to be tested on the other platforms (i.e. some tweaking might be necessary).
2015-04-09Delete a canvas tooltip after we've finished with itJohn Emmas
All canvas objects share just one tooltip object which is based around Gtk::Label. The Label expands if the current tooltip text is wider than the previous text. However, it doesn't shrink again if the next tooltip has shorter text. Eventually, this results in some very strange looking tooltips (especially in Mixbus where they're used quite extensively). Deleting the object after use will force a new object to get generated next time (at the correct size). There's still only ever one object per canvas but it's no longer persistent.
2015-02-12_single_exposure is now a member variable for each GtkCanvas.Ben Loftis
Gtk coalesces multiple exposes into a single combined rect. If _single_exposure is disabled, we break apart the individual expose rects for the canvas rendering.
2015-02-09correct drawing of rectangle borders.Paul Davis
They need to use fractional coordinates, and the border position needed generalizing for other border widths. See verbose comment for details
2015-02-03tweak to help with uncoalesced rendersBen Loftis
2015-02-03render canvas using the GDK region rather than the GDK area.Paul Davis
The region is the un-coalesced set of rectangles that were requested for redraw. The area is the coalesced single rectangle. In the worst cases, the coalesced rectangle could span the entire window even though just two pixels in opposite corners were to be redrawn. There is a problem with the verbose cursor as it is dragged across MIDI tracks. TO BE FIXED.
2015-01-24ScrollGroups are kept in their own list, so ::window_to_canvas() does not ↵Paul Davis
need to inspect root group children to find them Conflicts: libs/canvas/canvas.cc
2015-01-16Put playhead on top of everything.David Robillard
Achieve this by adding a new hscroll group just for cursors. That requires a slightly smarter window_to_canvas() to deal with overlapping sensitive scroll groups. New rule is that scroll groups can overlap, but the most sensitive one found from the top down will be chosen to translate coordinates. This basically means don't overlap scroll groups with different sensitivities. In the presence of scroll groups, having a canvas-wide window_to_canvas() and/or canvas_to_window() fundamentally makes no sense. At some point in the glorious future we should kill those and use only item-relative coordinate translation.
2015-01-12Fix mouse event position offset bug.David Robillard
Search scroll groups for event delivery from top to bottom rather than bottom to top. Overlapping scroll groups still aren't properly supported by the canvas, but currently all we care about is that the top one gets the event, so the hscroll group (tempo lines) can be below the hvscroll group (tracks), but the latter gets events.
2014-12-31Fix alleged use of uninitialized variable.David Robillard
Looks like a guaranteed else branch to me, but who am I to argue with gcc?
2014-11-15Fix MIDI region keyboard editing (add key handling to canvas).David Robillard
2014-11-13fix defineRobin Gareus
2014-11-10tweak canvas on_expose_event() handler to avoid unnecessary save/paint/restorePaul Davis
2014-11-10add required header for compilationPaul Davis
2014-11-10add background color property to Canvas::Canvas ; rearrange expose handling ↵Paul Davis
and include background fill Conflicts: libs/canvas/canvas.cc libs/canvas/canvas/canvas.h