[libcamera-devel] [PATCH 18/21] qcam: viewfinder: Reorder methods to match header file
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Mar 23 15:22:02 CET 2020
Reorder the methods in viewfinder.cpp to match the order in
viewfinder.h. No code change.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
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);
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list