summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder_gl.h
AgeCommit message (Collapse)Author
2020-10-04qcam: viewfinder_gl: Add shader to render packed YUV formatsLaurent Pinchart
The shader supports all 4 packed 8-bit YUV variants. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-04qcam: viewfinder_gl: Support #define in shadersLaurent Pinchart
Prepare the infrastructure to support defining preprocessor macros in shaders: - Rename the fragmentShaderSrc_ member to fragmentShaderFile_ to reflect better that it contains a file name, not shader source code - Add a new fragmentShaderDefines_ member to store preprocessor macros - Prepend the macros to the shader source before compiling it Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-04qcam: viewfinder_gl: Hardcode the vertex shader file nameLaurent Pinchart
The GL renderer uses the same vertex shader for all formats. Hardcode the file name instead of storing it in a member variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-10-04qcam: viewfinder_gl: Don't store texture IDs in class membersLaurent Pinchart
The texture IDs can easily and cheaply be retrieved from the textures, there's no need to store them in class members. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-09-15qcam: Add ViewFinderGL class to accelerate the format conversionShow Liu
The viewfinderGL accelerates the format conversion by using OpenGL ES shader. The minimum Qt version is bumped to v5.4, as QOpenGLWidget wasn't available before that. Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>