summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-23 02:34:36 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-24 10:34:07 +0200
commitac828f937e5426d48f996a29e70ff1a6ab5c85e6 (patch)
tree79067307260e3ca747f3b069560b7b35935e23f4 /src
parentdc830e0e5f429fa2d17129d6d9f79c9c4c711f6e (diff)
qcam: viewfinder: Reorder methods to match header file
Reorder the methods in viewfinder.cpp to match the order in viewfinder.h. No code change. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/qcam/viewfinder.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index c4471ffa..31b358da 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);