summaryrefslogtreecommitdiff
path: root/standalone-clients
diff options
authorGord Allott <gord.allott@canonical.com>2012-02-13 12:03:06 +0000
committerGord Allott <gord.allott@canonical.com>2012-02-13 12:03:06 +0000
commit5ec9ad007b762da3ea092c718d997fb56a389348 (patch)
tree26681cb5f4dae03ffc875553d123de3db357f197 /standalone-clients
parent71c890a0db9f47bf401275b80810e70287840df1 (diff)
modifes BGHash to cache its background colours, stores cache in a cache file, should speed up startup time somewhat
(bzr r1948.7.1)
Diffstat (limited to 'standalone-clients')
-rw-r--r--standalone-clients/TestBGHash.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/standalone-clients/TestBGHash.cpp b/standalone-clients/TestBGHash.cpp
index 9c9fc1771..5548c2031 100644
--- a/standalone-clients/TestBGHash.cpp
+++ b/standalone-clients/TestBGHash.cpp
@@ -26,6 +26,11 @@
#include "ubus-server.h"
#include "UBusMessages.h"
+namespace
+{
+ nux::logging::Logger logger("unity.BGHash");
+}
+
class TestRunner
{
public:
@@ -52,7 +57,10 @@ void TestRunner::Init ()
{
nux::Color hash = bghash.CurrentColor ();
- g_debug ("hashed color: %f - %f - %f", hash.red, hash.green, hash.blue);
+ LOG_DEBUG(logger) << "hashed color: "
+ << hash.red << ", "
+ << hash.green << ", "
+ << hash.blue;
}
@@ -79,7 +87,10 @@ test_handler_color_change (GVariant *data, gpointer val)
gdouble red, green, blue, alpha;
g_variant_get (data, "(dddd)", &red, &green, &blue, &alpha);
- //g_debug ("new color: %f, %f, %f", red, green, blue);
+ LOG_TRACE(logger) << "hashed color: "
+ << red << ", "
+ << green << ", "
+ << blue;
}
int main(int argc, char **argv)
@@ -98,6 +109,9 @@ int main(int argc, char **argv)
gtk_init (&argc, &argv);
nux::NuxInitialize(0);
+ // Slightly higher as we're more likely to test things we know will fail
+ nux::logging::configure_logging("unity.BGHash=debug");
+
nux::logging::configure_logging(::getenv("UNITY_LOG_SEVERITY"));
unity::BGHash bg_hash;