Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:ardour_windows_gdk_and_cairo [26.10.2014 13:57]
rgareus
wiki:ardour_windows_gdk_and_cairo [28.10.2014 15:24] (current)
81.57.94.90 [Ardour, Windows, Gdk/GTK and Cairo]
Line 2: Line 2:
  
 Lab Notes.\\ Lab Notes.\\
-Analysis the //slowness// and high CPU-usage of the Ardour3 GUI on the windows platform.+Analysis the //slowness// and high CPU-usage of the [[http://ardour.org|Ardour3]] GUI on the Windows platform.
  
 ===== Findings ===== ===== Findings =====
Line 56: Line 56:
  
 -> BitBlt the complete window. zzzZZZ. -> BitBlt the complete window. zzzZZZ.
 +
 +(possible workaround: unset [[https://developer.gnome.org/gtk2/stable/GtkWidget.html#gtk-widget-set-double-buffered|double buffering]])
  
 ==== C: Gdk/Windows Drawing Context Size ==== ==== C: Gdk/Windows Drawing Context Size ====
Line 91: Line 93:
  
 Various hacks would be possible to address the issue. Various hacks would be possible to address the issue.
-However there's not a single simple point to easily work around this.+<del>However there's not a single simple point to easily work around this</del>.
 Probably the easiest way to mitigate the performance hog is to provide a custom GdkDrawable implementation for the main canvas (which does not use a hardware backed surface) and keep using default GdkDrawable for all other widgets.  A similar solution would be to make the backing-store of GdkWindow persistent and access it directly. Probably the easiest way to mitigate the performance hog is to provide a custom GdkDrawable implementation for the main canvas (which does not use a hardware backed surface) and keep using default GdkDrawable for all other widgets.  A similar solution would be to make the backing-store of GdkWindow persistent and access it directly.
-Yetin either case an invalidation strategy will have to be provided.+ 
 +A quick hack has been prototyped. The cairo-surface user-data API is used to flag select cairo/win surfaces to not BitBlt (ardour's main canvas & meters): [[https://gist.github.com/x42/ef0b0f6e70d416b3af17|patch for ardourlibcairo]] ((In this case a dedicated user-data key - known to ardour and libcairo - is used to tunnel the information though gdk/gtk which remains unchanged.)).
  
 Still, while performance on Linux & OSX is OKish, the expose and invalidation strategy (see B -> F above) is abysmal and unsuitable for Ardour in general. It only works because CPUs are fast :) Still, while performance on Linux & OSX is OKish, the expose and invalidation strategy (see B -> F above) is abysmal and unsuitable for Ardour in general. It only works because CPUs are fast :)
 
wiki/ardour_windows_gdk_and_cairo.1414328251.txt.gz · Last modified: 26.10.2014 13:57 by rgareus