From patchwork Wed Sep 21 13:59:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 4219 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 75D1E23EFA for ; Wed, 21 Sep 2011 13:59:13 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 5D1CEA18A43 for ; Wed, 21 Sep 2011 13:59:13 +0000 (UTC) Received: by fxe23 with SMTP id 23so2334882fxe.11 for ; Wed, 21 Sep 2011 06:59:13 -0700 (PDT) Received: by 10.223.74.89 with SMTP id t25mr1116413faj.65.1316613553160; Wed, 21 Sep 2011 06:59:13 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.18.198 with SMTP id y6cs127197lad; Wed, 21 Sep 2011 06:59:13 -0700 (PDT) Received: by 10.216.220.220 with SMTP id o70mr868392wep.19.1316613552582; Wed, 21 Sep 2011 06:59:12 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id t62si4308700weq.67.2011.09.21.06.59.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Sep 2011 06:59:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R6NKS-0007zq-07 for ; Wed, 21 Sep 2011 13:59:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id ED11AE013D for ; Wed, 21 Sep 2011 13:59:11 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glcompbench X-Launchpad-Branch: ~glcompbench-dev/glcompbench/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 61 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glcompbench-dev/glcompbench/trunk] Rev 61: CompositeCanvas, Main: Improve handling of canvas initialization errors. Message-Id: <20110921135911.12692.1351.launchpad@ackee.canonical.com> Date: Wed, 21 Sep 2011 13:59:11 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13996"; Instance="initZopeless config overlay" X-Launchpad-Hash: fd34e8d50f6ba35c25b73bee0bba89ca099ff9ca ------------------------------------------------------------ revno: 61 committer: Alexandros Frantzis branch nick: trunk timestamp: Wed 2011-09-21 16:57:01 +0300 message: CompositeCanvas,Main: Improve handling of canvas initialization errors. modified: src/composite-canvas.cc src/glcompbench.cc --- lp:glcompbench https://code.launchpad.net/~glcompbench-dev/glcompbench/trunk You are subscribed to branch lp:glcompbench. To unsubscribe from this branch go to https://code.launchpad.net/~glcompbench-dev/glcompbench/trunk/+edit-subscription === modified file 'src/composite-canvas.cc' --- src/composite-canvas.cc 2011-08-03 14:34:10 +0000 +++ src/composite-canvas.cc 2011-09-21 13:57:01 +0000 @@ -220,7 +220,7 @@ vis_info->visual, mask, &attr); /* set hints and properties */ - { + if (win) { XSizeHints sizehints; sizehints.x = x; sizehints.y = y; @@ -231,6 +231,9 @@ XSetStandardProperties(xdpy_, win, name, name, None, NULL, 0, &sizehints); } + else { + Log::error("XCreateWindow() failed\n"); + } return win; } @@ -538,8 +541,10 @@ { /* Open the display */ xdpy_ = XOpenDisplay(NULL); - if (!xdpy_) + if (!xdpy_) { + Log::error("Error connecting to X Server. XOpenDisplay() failed.\n"); return false; + } root_ = RootWindow(xdpy_, DefaultScreen(xdpy_)); === modified file 'src/glcompbench.cc' --- src/glcompbench.cc 2011-08-04 10:49:59 +0000 +++ src/glcompbench.cc 2011-09-21 13:57:01 +0000 @@ -202,8 +202,16 @@ if (test_canvas != canvas && test_canvas != 0) { if (canvas) canvas->deinit(); + + if (!test_canvas->init()) { + Log::error("Cannot initialize canvas of type '%s'. " + "Skipping benchmark based on test '%s'.\n", + test_canvas->type().c_str(), + benchmark->get_test().name().c_str()); + continue; + } + canvas = test_canvas; - canvas->init(); Log::info("=======================================================\n"); Log::info("%s", canvas->info_string().c_str()); Log::info("=======================================================\n");