diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-23 02:34:36 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-03-24 10:34:07 +0200 |
commit | ac828f937e5426d48f996a29e70ff1a6ab5c85e6 (patch) | |
tree | 79067307260e3ca747f3b069560b7b35935e23f4 /src/qcam/viewfinder.cpp | |
parent | dc830e0e5f429fa2d17129d6d9f79c9c4c711f6e (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/qcam/viewfinder.cpp')
-rw-r--r-- | src/qcam/viewfinder.cpp | 36 |
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); |