From patchwork Thu Jun 23 14:23:14 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: 2210 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 3A92723F6D for ; Thu, 23 Jun 2011 14:23:18 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id E5DD8A189BD for ; Thu, 23 Jun 2011 14:23:17 +0000 (UTC) Received: by qyk10 with SMTP id 10so3831525qyk.11 for ; Thu, 23 Jun 2011 07:23:17 -0700 (PDT) Received: by 10.229.40.139 with SMTP id k11mr1604898qce.135.1308838997213; Thu, 23 Jun 2011 07:23:17 -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.229.230.139 with SMTP id jm11cs19222qcb; Thu, 23 Jun 2011 07:23:16 -0700 (PDT) Received: by 10.227.19.209 with SMTP id c17mr2015384wbb.8.1308838995743; Thu, 23 Jun 2011 07:23:15 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id fl7si3920490wbb.107.2011.06.23.07.23.15; Thu, 23 Jun 2011 07:23:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QZkoN-0003mD-0i for ; Thu, 23 Jun 2011 14:23:15 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 0197C2E8027 for ; Thu, 23 Jun 2011 14:23:15 +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: 27 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glcompbench-dev/glcompbench/trunk] Rev 27: Add --no-swap-buffers command line option. Message-Id: <20110623142314.3922.46932.launchpad@loganberry.canonical.com> Date: Thu, 23 Jun 2011 14:23:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13265"; Instance="initZopeless config overlay" X-Launchpad-Hash: df7f8c457ecc020cafa7033e066e3a06b0315ab5 ------------------------------------------------------------ revno: 27 committer: Alexandros Frantzis branch nick: trunk timestamp: Thu 2011-06-23 12:49:07 +0300 message: Add --no-swap-buffers command line option. modified: src/composite-canvas-egl.cc src/composite-canvas-glx.cc src/options.cc src/options.h --- 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-egl.cc' --- src/composite-canvas-egl.cc 2011-04-26 15:02:03 +0000 +++ src/composite-canvas-egl.cc 2011-06-23 09:49:07 +0000 @@ -268,5 +268,8 @@ void CompositeCanvasEGL::update_screen() { - eglSwapBuffers(egl_display_, egl_surface_); + if (Options::swap_buffers) + eglSwapBuffers(egl_display_, egl_surface_); + else + glFinish(); } === modified file 'src/composite-canvas-glx.cc' --- src/composite-canvas-glx.cc 2011-04-26 15:02:03 +0000 +++ src/composite-canvas-glx.cc 2011-06-23 09:49:07 +0000 @@ -199,5 +199,8 @@ void CompositeCanvasGLX::update_screen() { - glXSwapBuffers(xdpy_, canvas_); + if (Options::swap_buffers) + glXSwapBuffers(xdpy_, canvas_); + else + glFinish(); } === modified file 'src/options.cc' --- src/options.cc 2011-06-23 08:54:28 +0000 +++ src/options.cc 2011-06-23 09:49:07 +0000 @@ -43,6 +43,7 @@ bool Options::show_help = false; bool Options::use_vbo = true; bool Options::list_tests = false; +bool Options::swap_buffers = true; static struct option long_options[] = { {"ids", 1, 0, 0}, @@ -57,6 +58,7 @@ {"run-forever", 0, 0, 0}, {"num-iters", 1, 0, 0}, {"list-tests", 0, 0, 0}, + {"no-swap-buffers", 0, 0, 0}, {"debug", 0, 0, 0}, {"help", 0, 0, 0}, {0, 0, 0, 0} @@ -98,6 +100,8 @@ " --num-iters The number of iterations run for each test\n" " [default: 5]\n" " --list-tests List the avalaible tests and their options\n" + " --no-swap-buffers Don't update the screen by swapping the front and\n" + " back buffer, use glFinish() instead\n" " --debug Display debug messages\n" " --help Display help\n"); } @@ -144,6 +148,8 @@ Options::list_tests = true; else if (!strcmp(optname, "manual-redirect")) Options::manual_redirect = true; + else if (!strcmp(optname, "no-swap-buffers")) + Options::swap_buffers = false; else if (!strcmp(optname, "debug")) Options::show_debug = true; else if (!strcmp(optname, "help")) === modified file 'src/options.h' --- src/options.h 2011-06-23 08:54:28 +0000 +++ src/options.h 2011-06-23 09:49:07 +0000 @@ -46,6 +46,7 @@ static bool show_help; static bool use_vbo; static bool list_tests; + static bool swap_buffers; }; #endif /* OPTIONS_H_ */