mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-04-23 14:01:26 +00:00
marks: stub out a visualizer row
This doesn't do any rendering yet, but it gets us the plumbing we need to start rendering mark content into a visualizer row.
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include "visualizers/sp-cpu-visualizer-row.h"
|
||||
#include "visualizers/sp-visualizer-list.h"
|
||||
#include "visualizers/sp-visualizer-row.h"
|
||||
#include "visualizers/sp-mark-visualizer-row.h"
|
||||
#include "util/sp-zoom-manager.h"
|
||||
|
||||
#define NSEC_PER_SEC G_GUINT64_CONSTANT(1000000000)
|
||||
@ -181,6 +182,7 @@ sp_visualizer_list_get_reader (SpVisualizerList *self)
|
||||
|
||||
enum {
|
||||
FOUND_CPU = 1 << 0,
|
||||
FOUND_MARK = 1 << 1,
|
||||
};
|
||||
|
||||
static gboolean
|
||||
@ -192,6 +194,9 @@ discover_new_rows_frame_cb (const SpCaptureFrame *frame,
|
||||
g_assert (frame != NULL);
|
||||
g_assert (found != NULL);
|
||||
|
||||
if (frame->type == SP_CAPTURE_FRAME_MARK)
|
||||
*found = FOUND_MARK;
|
||||
|
||||
/* TODO: Make this look for CPU define. Currently it is the
|
||||
* only thing that uses it. So...
|
||||
*/
|
||||
@ -230,6 +235,13 @@ handle_capture_results (GObject *object,
|
||||
|
||||
found = g_task_propagate_int (G_TASK (result), NULL);
|
||||
|
||||
if (found & FOUND_MARK)
|
||||
{
|
||||
GtkWidget *row = sp_mark_visualizer_row_new ();
|
||||
gtk_container_add (GTK_CONTAINER (self), row);
|
||||
gtk_widget_show (row);
|
||||
}
|
||||
|
||||
if (found & FOUND_CPU)
|
||||
{
|
||||
GtkWidget *row = g_object_new (SP_TYPE_CPU_VISUALIZER_ROW,
|
||||
|
||||
Reference in New Issue
Block a user