[libcamera-devel] [PATCH 18/21] qcam: viewfinder: Reorder methods to match header file

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Mar 23 18:13:02 CET 2020


Hi Laurent,

On 23/03/2020 14:22, Laurent Pinchart wrote:
> Reorder the methods in viewfinder.cpp to match the order in
> viewfinder.h. No code change.

Ok then,

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> 
> 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
--
Kieran


More information about the libcamera-devel mailing list