Age | Commit message (Collapse) | Author |
|
|
|
|
|
A canvas is just a canvas. Move WaveView into its own library.
|
|
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
|
|
|
|
|
|
|
|
The drawing itself should be unchanged but much of the rest of the
implementation has changed. The WaveViewThreads and WaveViewDrawingThread
classes were added and allow multiple drawing threads.
The Item::prepare_for_render interface is implemented by WaveView to enable
queuing draw requests for the drawing threads to process as soon as the state
change occurs during Editor::visual_changer, which often means the images will
be finished by the time they are needed in WaveView::render. This can
significantly reduce total render time and also flickering caused by images not
being ready for display.
If the drawing thread/s cannot finish the request by the time it is required in
WaveView::render then cancel it and draw the WaveViewImage in the GUI thread if
it is likely it can be completed in the current render pass/frame. This change
also helps reduce the flickering caused by images not being ready with threaded
rendering, but with several drawing threads, drawing in the GUI thread may not
often occur (unless explicitly requested).
Allow unfinished images to be returned from the cache in
WaveView::prepare_for_render so that new draw requests aren't queued for
duplicate images. This reduces the amount of drawing for instance in
compositions where there are many instances of the same sample/waveform
displayed on the canvas as only a single image should be drawn.
Use a random width within a certain range for
WaveView::optimal_image_width_samples so that image drawing is less likely to
occur at the same time (which will cause a spike in render/draw time and
increase the chance of flickering waveforms).
Move implementations of the private WaveView classes into wave_view_private.h
and wave_view_private.cc source files.
Incorporate a fix for limiting the waveview image size to the cairo image size
limit.
Should hopefully Resolve: #6478
|
|
Initial use is for the WaveView class to determine whether on not to draw the
waveform in the GUI thread.
|
|
|
|
intersect
Refactor GtkCanvas::request_redraw to use Rect::intersection
|
|
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.
|
|
Emitted by the canvas immediately before rendering.
|
|
|
|
Using stringstream for this is not locale independant. If this constructor is
needed at a later stage it should be reimplemented.
|
|
float <=> string conversion now done using PBD::to_string/string_to so
LocaleGuards are no longer needed.
|
|
With large sample-rates and high-zoom-level the minimal request-size
or at least 1/10sed can exceed the max image size supported by cairo.
e.g. @192kSPS; 100ms = 19200 samples.
* 1 sample/pixel, * 2 (left/right) = 38400px > 2^15px.
|
|
|
|
|
|
|
|
|
|
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
|
|
This fixes an -Woverloaded-virtual ambiguity introduced in b5e613d45
void render (cairo_t*, cairo_rectagle*)
void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*)
ArdourCanvas prefers cairomm and CairoWidget itself uses Cairo::Context,
this improves overall API consistency.
|
|
|
|
This allows to re-use the concept with CairoWidget
|
|
|
|
Special case Ardour's Canvas NSView to forward gdk-events
which are otherwise special-cased to read AU-views..
|
|
This avoids Coregraphics (cairo_quartz_surface..) competely.
The openGL texture bypasses CG's slow argb_image and CGSColorMask
methods.
|
|
Once upon a time there was a beautiful Apple tree in palace of
GtkAnkhAmun in Cairo...
|
|
|
|
Fix right-alignment (tempo-markers) and oversized bounding-boxes.
_width_correction should be removed after testing on various systems.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for Canvas::Item
|
|
|
|
boost::optional from Canvas
|
|
from Canvas
|
|
Revert "add basic data members and methods for adding an explicit size allocation for Canvas::Item"
This reverts commit d1c1d8df614672b00a9835ae04566b12d21be697.
|
|
for Canvas::Item
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|