From patchwork Thu Feb 23 10:45:14 2012 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: 6893 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 2283A2450A for ; Thu, 23 Feb 2012 10:45:18 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id BF5EFA188E5 for ; Thu, 23 Feb 2012 10:45:17 +0000 (UTC) Received: by iabz7 with SMTP id z7so1872522iab.11 for ; Thu, 23 Feb 2012 02:45:17 -0800 (PST) Received: from mr.google.com ([10.50.155.231]) by 10.50.155.231 with SMTP id vz7mr832687igb.26.1329993917237 (num_hops = 1); Thu, 23 Feb 2012 02:45:17 -0800 (PST) Received: by 10.50.155.231 with SMTP id vz7mr720993igb.26.1329993917170; Thu, 23 Feb 2012 02:45:17 -0800 (PST) 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.231.11.10 with SMTP id r10csp7717ibr; Thu, 23 Feb 2012 02:45:16 -0800 (PST) Received: by 10.180.100.33 with SMTP id ev1mr1480766wib.3.1329993915632; Thu, 23 Feb 2012 02:45:15 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id r37si680317weq.32.2012.02.23.02.45.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Feb 2012 02:45:15 -0800 (PST) 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 1S0WAk-0005TC-El for ; Thu, 23 Feb 2012 10:45:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 50E2CE0025 for ; Thu, 23 Feb 2012 10:45:14 +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: 77 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glcompbench-dev/glcompbench/trunk] Rev 77: glproxy: Adapted to new initialization API. Message-Id: <20120223104514.22649.52240.launchpad@ackee.canonical.com> Date: Thu, 23 Feb 2012 10:45: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="14855"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: e35338059f79e6baa81f01ff4334e5e9acd5cac1 X-Gm-Message-State: ALoCoQkMPV/LaAoTGrekMMHnTNqxkBJWrDBlIleL9+gmBbsZ37IKm5dez7r+hAE3KStz6+83scem ------------------------------------------------------------ revno: 77 author: Marc Ordinas i Llopis committer: Alexandros Frantzis branch nick: trunk timestamp: Fri 2012-02-17 12:51:23 +0100 message: glproxy: Adapted to new initialization API. modified: src/glcompbench.cc src/options.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/glcompbench.cc' --- src/glcompbench.cc 2012-01-27 22:21:17 +0000 +++ src/glcompbench.cc 2012-02-17 11:51:23 +0000 @@ -142,6 +142,9 @@ int main(int argc, char **argv) { +#ifdef USE_GLPROXY + glProxyContext *proxy_context; +#endif std::list canvas_list; canvas_list.push_back(new CompositeCanvasPixman()); canvas_list.push_back(new CompositeCanvasXRender()); @@ -160,15 +163,20 @@ #ifdef USE_GLPROXY // Initialize the proxy library and create the correct GL canvas - PROXY_BACKEND_OPTION backend = UNKNOWN_BACKEND; + proxy_context = glProxyInit(); if (Options::backend == Options::BACKEND_GLX) { - backend = OPENGL_BACKEND; - glProxyInit(&backend); + if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_GLX_OPENGL)) + return -1; canvas_list.push_back(new CompositeCanvasGLX()); } else if (Options::backend == Options::BACKEND_EGL_ES2) { - backend = OPENGL_ES20_BACKEND; - glProxyInit(&backend); + if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_EGL_OPENGLES2)) + return -1; + + canvas_list.push_back(new CompositeCanvasEGL()); + } else if (Options::backend == Options::BACKEND_EGL_GL) { + if (!glProxyLoad(proxy_context, GLPROXY_BACKEND_EGL_OPENGL)) + return -1; canvas_list.push_back(new CompositeCanvasEGL()); } else { @@ -263,5 +271,8 @@ } +#ifdef USE_GLPROXY + glProxyClose(proxy_context); +#endif return 0; } === modified file 'src/options.cc' --- src/options.cc 2011-12-14 12:49:09 +0000 +++ src/options.cc 2012-02-17 11:51:23 +0000 @@ -72,7 +72,7 @@ }; #ifdef USE_GLPROXY -static const char *available_backends = "glx, egl-es2"; +static const char *available_backends = "glx, egl-es2, egl-gl"; #elif defined(USE_GLX) static const char *available_backends = "glx"; #elif defined(USE_EGL) && defined(USE_GL)