diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-02 19:48:56 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-07 23:08:42 +0400 |
commit | 087091652bf8b351432a3f3fb50996ee3582d5e4 (patch) | |
tree | 2cfbff9c5f1262a5597a9250b108545e4e9663c0 /tools/perf/util/ui/browser.c | |
parent | 31d68e7b66f168e623902e194af1e52b8cf75d71 (diff) | |
download | linux-087091652bf8b351432a3f3fb50996ee3582d5e4.tar.xz |
perf ui browser: Return the current color when setting a new one
Tools that want to change parts of the line to a different color and
then restore the previous one will use this, starting with the annotate
browser that will change the color of addresses if not on the current
entry, i.e. the selected one.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-uiajpevhxo4mzrvna6remb4a@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ui/browser.c')
-rw-r--r-- | tools/perf/util/ui/browser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c index 556829124b02..076a5ffc8f56 100644 --- a/tools/perf/util/ui/browser.c +++ b/tools/perf/util/ui/browser.c @@ -27,9 +27,12 @@ static int ui_browser__percent_color(struct ui_browser *browser, return HE_COLORSET_NORMAL; } -void ui_browser__set_color(struct ui_browser *self __used, int color) +int ui_browser__set_color(struct ui_browser *browser, int color) { + int ret = browser->current_color; + browser->current_color = color; SLsmg_set_color(color); + return ret; } void ui_browser__set_percent_color(struct ui_browser *self, |