mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Revert canvas debugging
This reverts commit8359311849. This reverts commitf377822891. This reverts commit859d6ebe4a. This reverts commit4cd7de7a6f.
This commit is contained in:
parent
c707b056af
commit
d12dd4015d
10 changed files with 20 additions and 73 deletions
|
|
@ -22,7 +22,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#define CANVAS_PROFILE
|
||||
//#define CANVAS_PROFILE
|
||||
|
||||
/** @file canvas/canvas.cc
|
||||
* @brief Implementation of the main canvas classes.
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <gtkmm/adjustment.h>
|
||||
#include <gtkmm/label.h>
|
||||
#include <gtkmm/window.h>
|
||||
|
|
@ -54,7 +53,6 @@ using namespace std;
|
|||
using namespace ArdourCanvas;
|
||||
|
||||
uint32_t Canvas::tooltip_timeout_msecs = 750;
|
||||
uint64_t ArdourCanvas::nodraw = 0;
|
||||
|
||||
/** Construct a new Canvas */
|
||||
Canvas::Canvas ()
|
||||
|
|
@ -71,13 +69,6 @@ Canvas::Canvas ()
|
|||
_use_intermediate_surface = NULL != g_getenv("ARDOUR_INTERMEDIATE_SURFACE");
|
||||
#endif
|
||||
set_epoch ();
|
||||
|
||||
const char * dbg = g_getenv ("ARDOUR_CANVAS_NODRAW");
|
||||
|
||||
if (dbg) {
|
||||
nodraw = strtoull (dbg, NULL, 0);
|
||||
std::cerr << "\n\n **** SET NODRAW FROM " << dbg << " to " << std::hex << nodraw << std::dec << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -138,9 +129,6 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
|||
#ifdef CANVAS_PROFILE
|
||||
const int64_t start = g_get_monotonic_time ();
|
||||
#endif
|
||||
if (ArdourCanvas::nodraw & 0x40) {
|
||||
std::cout << "GtkCanvas::render " << area << "\n";
|
||||
}
|
||||
|
||||
PreRender (); // emit signal
|
||||
|
||||
|
|
@ -187,11 +175,9 @@ Canvas::render (Rect const & area, Cairo::RefPtr<Cairo::Context> const & context
|
|||
}
|
||||
|
||||
#ifdef CANVAS_PROFILE
|
||||
if (ArdourCanvas::nodraw & 0x100) {
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
std::cout << "GtkCanvas::render " << area << " " << (elapsed / 1000.f) << " ms\n";
|
||||
}
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
std::cout << "GtkCanvas::render " << area << " " << (elapsed / 1000.f) << " ms\n";
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
@ -1082,11 +1068,9 @@ GtkCanvas::on_expose_event (GdkEventExpose* ev)
|
|||
|
||||
|
||||
#ifdef CANVAS_PROFILE
|
||||
if (ArdourCanvas::nodraw & 0x100) {
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
printf ("GtkCanvas::on_expose_event %f ms\n", elapsed / 1000.f);
|
||||
}
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
printf ("GtkCanvas::on_expose_event %f ms\n", elapsed / 1000.f);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
@ -1318,9 +1302,6 @@ GtkCanvas::on_unmap ()
|
|||
void
|
||||
GtkCanvas::queue_draw()
|
||||
{
|
||||
if (ArdourCanvas::nodraw & 0x20) {
|
||||
std::cout << "GtkCanvas::queue_draw " << get_width () << " x " << get_height () << "\n";
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
if (_nsglview) {
|
||||
Gtkmm2ext::nsglview_queue_draw (_nsglview, 0, 0, get_width (), get_height ());
|
||||
|
|
@ -1333,9 +1314,6 @@ GtkCanvas::queue_draw()
|
|||
void
|
||||
GtkCanvas::queue_draw_area (int x, int y, int width, int height)
|
||||
{
|
||||
if (ArdourCanvas::nodraw & 0x20) {
|
||||
std::cout << "GtkCanvas::queue_draw_area " << width << " x " << height << " @ " << x << " + " << y << "\n";
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
if (_nsglview) {
|
||||
Gtkmm2ext::nsglview_queue_draw (_nsglview, x, y, width, height);
|
||||
|
|
|
|||
|
|
@ -188,7 +188,6 @@ public:
|
|||
|
||||
void set_debug_render (bool yn) { _debug_render = yn; }
|
||||
bool debug_render() const { return _debug_render; }
|
||||
|
||||
protected:
|
||||
Root _root;
|
||||
uint32_t _queue_draw_frozen;
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ public:
|
|||
}
|
||||
|
||||
bool fill () const {
|
||||
if (ArdourCanvas::nodraw & 0x1) {
|
||||
return false;
|
||||
}
|
||||
return _fill;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ public:
|
|||
virtual void set_outline_width (Distance);
|
||||
|
||||
bool outline () const {
|
||||
if (ArdourCanvas::nodraw & 0x2) {
|
||||
return false;
|
||||
}
|
||||
return _outline;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,8 +257,6 @@ struct FourDimensions {
|
|||
}
|
||||
};
|
||||
|
||||
extern LIBCANVAS_API uint64_t nodraw;
|
||||
|
||||
extern LIBCANVAS_API std::ostream & operator<< (std::ostream &, Rect const &);
|
||||
|
||||
typedef std::vector<Duple> Points;
|
||||
|
|
|
|||
|
|
@ -88,10 +88,6 @@ LineSet::set_extent (Distance e)
|
|||
void
|
||||
LineSet::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
if (ArdourCanvas::nodraw & 0x8) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* area is in window coordinates */
|
||||
|
||||
for (vector<Line>::const_iterator i = _lines.begin(); i != _lines.end(); ++i) {
|
||||
|
|
|
|||
|
|
@ -101,11 +101,7 @@ Rectangle::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) con
|
|||
if (_stops.empty()) {
|
||||
setup_fill_context (context);
|
||||
} else {
|
||||
if (ArdourCanvas::nodraw & 0x80) {
|
||||
setup_fill_context (context);
|
||||
} else {
|
||||
setup_gradient_context (context, self, Duple (draw.x0, draw.y0));
|
||||
}
|
||||
setup_gradient_context (context, self, Duple (draw.x0, draw.y0));
|
||||
}
|
||||
|
||||
if (_corner_radius) {
|
||||
|
|
|
|||
|
|
@ -206,10 +206,6 @@ Text::_redraw () const
|
|||
void
|
||||
Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
if (ArdourCanvas::nodraw & 0x4) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_text.empty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,13 +25,9 @@
|
|||
|
||||
#include <gdk/gdkquartz.h>
|
||||
|
||||
#define NSVIEW_PROFILE
|
||||
//#define NSVIEW_PROFILE
|
||||
//#define DEBUG_NSVIEW_EXPOSURE
|
||||
|
||||
namespace ArdourCanvas {
|
||||
extern uint64_t nodraw;
|
||||
}
|
||||
|
||||
#include <OpenGL/gl.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
|
@ -121,12 +117,12 @@ __attribute__ ((visibility ("hidden")))
|
|||
glEnable (GL_TEXTURE_RECTANGLE_ARB);
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
|
||||
if (ArdourCanvas::nodraw & 0x200) {
|
||||
[self setWantsBestResolutionOpenGLSurface:NO];
|
||||
} else {
|
||||
[self setWantsBestResolutionOpenGLSurface:YES];
|
||||
[self setWantsLayer:YES];
|
||||
}
|
||||
#if 1
|
||||
[self setWantsBestResolutionOpenGLSurface:YES];
|
||||
[self setWantsLayer:YES];
|
||||
#else
|
||||
[self setWantsBestResolutionOpenGLSurface:NO];
|
||||
#endif
|
||||
|
||||
[self reshape];
|
||||
}
|
||||
|
|
@ -169,7 +165,7 @@ __attribute__ ((visibility ("hidden")))
|
|||
}
|
||||
|
||||
float scale = 1.0;
|
||||
if ([self window] && 0 == (ArdourCanvas::nodraw & 0x200)) {
|
||||
if ([self window]) {
|
||||
scale = [[self window] backingScaleFactor];
|
||||
}
|
||||
|
||||
|
|
@ -247,7 +243,7 @@ __attribute__ ((visibility ("hidden")))
|
|||
#endif
|
||||
|
||||
float scale = 1.0;
|
||||
if ([self window] && 0 == (ArdourCanvas::nodraw & 0x200)) {
|
||||
if ([self window]) {
|
||||
scale = [[self window] backingScaleFactor];
|
||||
}
|
||||
|
||||
|
|
@ -343,11 +339,9 @@ __attribute__ ((visibility ("hidden")))
|
|||
[super setNeedsDisplay:NO];
|
||||
|
||||
#ifdef NSVIEW_PROFILE
|
||||
if (ArdourCanvas::nodraw & 0x100) {
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
printf ("NSGL::drawRect (%d x %d) * %.1f in %f ms\n", _width, _height, scale, elapsed / 1000.f);
|
||||
}
|
||||
const int64_t end = g_get_monotonic_time ();
|
||||
const int64_t elapsed = end - start;
|
||||
printf ("NSGL::drawRect (%d x %d) * %.1f in %f ms\n", _width, _height, scale, elapsed / 1000.f);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -960,10 +960,6 @@ WaveView::draw_image_in_gui_thread () const
|
|||
void
|
||||
WaveView::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||
{
|
||||
if (ArdourCanvas::nodraw & 0x10) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert (_props->samples_per_pixel != 0);
|
||||
|
||||
if (!_region) { // assert?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue