From patchwork Mon Sep 19 15:37:12 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: 4184 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 D888323F98 for ; Mon, 19 Sep 2011 15:37:14 +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 CE7ACA189E8 for ; Mon, 19 Sep 2011 15:37:14 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so5743579fxe.11 for ; Mon, 19 Sep 2011 08:37:14 -0700 (PDT) Received: by 10.223.74.89 with SMTP id t25mr5316624faj.65.1316446634683; Mon, 19 Sep 2011 08:37:14 -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 y6cs43790lad; Mon, 19 Sep 2011 08:37:14 -0700 (PDT) Received: by 10.227.147.84 with SMTP id k20mr3010248wbv.71.1316446633321; Mon, 19 Sep 2011 08:37:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ek4si11011647wbb.45.2011.09.19.08.37.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Sep 2011 08:37:13 -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 1R5fuC-00053e-R4 for ; Mon, 19 Sep 2011 15:37:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id C467AE0106 for ; Mon, 19 Sep 2011 15:37:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 136 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 136: SceneDesktop: Use new features in LibMatrix to simplify some vector expressions. Message-Id: <20110919153712.30280.640.launchpad@ackee.canonical.com> Date: Mon, 19 Sep 2011 15:37:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13980"; Instance="initZopeless config overlay" X-Launchpad-Hash: 5a51d3c6a42ed1ae9877c98a0b4070bdcb6d2295 ------------------------------------------------------------ revno: 136 committer: Alexandros Frantzis branch nick: trunk timestamp: Mon 2011-09-19 18:34:58 +0300 message: SceneDesktop: Use new features in LibMatrix to simplify some vector expressions. modified: src/scene-desktop.cpp --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'src/scene-desktop.cpp' --- src/scene-desktop.cpp 2011-09-13 16:31:11 +0000 +++ src/scene-desktop.cpp 2011-09-19 15:34:58 +0000 @@ -252,8 +252,7 @@ */ LibMatrix::vec2 normalize_position(LibMatrix::vec2& pos) { - return LibMatrix::vec2(2.0 * pos.x() / size_.x() - 1.0, - 2.0 * pos.y() / size_.y() - 1.0); + return pos * 2.0 / size_ - 1.0; } /** @@ -261,8 +260,7 @@ */ LibMatrix::vec2 normalize_texcoord(LibMatrix::vec2& pos) { - return LibMatrix::vec2(pos.x() / size_.x(), - pos.y() / size_.y()); + return pos / size_; }