From patchwork Mon Mar 23 17:35:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3284 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 86D7760417 for ; Mon, 23 Mar 2020 18:36:22 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 23EE6A31 for ; Mon, 23 Mar 2020 18:36:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584984982; bh=FOEDiw5ZOGVfA1UftcUjP9SER1zDd2uJT/V19dVdqD4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NzNj8Z1uVjh+eJ2FF9KOA8YfFA8cNREjltb19YJHRYTcxciRpBqBf2nMJqgrcd/Ib 3kvZuOJd3RRfP6OQZsoZtzzjsjtdBUPsFO4eI3ib+K9FkHivtBGXpEGSNCwLZnHp+A CVlIPo38XDG9wiSQhxOpAFa9nOd6q7GogkiL5cCc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 23 Mar 2020 19:35:56 +0200 Message-Id: <20200323173559.21109-19-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200323173559.21109-1-laurent.pinchart@ideasonboard.com> References: <20200323173559.21109-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 18/21] qcam: viewfinder: Reorder methods to match header file X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2020 17:36:26 -0000 Reorder the methods in viewfinder.cpp to match the order in viewfinder.h. No code change. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/qcam/viewfinder.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp index c4471ffa4a06..31b358da47dc 100644 --- a/src/qcam/viewfinder.cpp +++ b/src/qcam/viewfinder.cpp @@ -24,6 +24,24 @@ ViewFinder::~ViewFinder() { } +int ViewFinder::setFormat(const libcamera::PixelFormat &format, + const QSize &size) +{ + int ret; + + ret = converter_.configure(format, size); + if (ret < 0) + return ret; + + format_ = format; + size_ = size; + + image_ = QImage(size_, QImage::Format_RGB32); + + updateGeometry(); + return 0; +} + void ViewFinder::render(libcamera::FrameBuffer *buffer, MappedBuffer *map) { if (buffer->planes().size() != 1) { @@ -53,24 +71,6 @@ QImage ViewFinder::getCurrentImage() return image_.copy(); } -int ViewFinder::setFormat(const libcamera::PixelFormat &format, - const QSize &size) -{ - int ret; - - ret = converter_.configure(format, size); - if (ret < 0) - return ret; - - format_ = format; - size_ = size; - - image_ = QImage(size_, QImage::Format_RGB32); - - updateGeometry(); - return 0; -} - void ViewFinder::paintEvent(QPaintEvent *) { QPainter painter(this);