For some formats, we could not download the dmabuf directly - in particular YUV formats. For those, do a copy on the GPU into the correct format. While we're at it, also check the desired format and colorstate and if they don't match, do the conversion on the GPU instead of using gdk_memory_convert(). Reserve the CPU conversion for situations where the GPU doesn't support the final format - like for example G8A8 (or often also RGB16).
22 lines
1.5 KiB
C
22 lines
1.5 KiB
C
#pragma once
|
|
|
|
#include "gskgputypesprivate.h"
|
|
#include "gsktypes.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
void gsk_gpu_node_processor_process (GskGpuFrame *frame,
|
|
GskGpuImage *target,
|
|
GdkColorState *target_color_state,
|
|
cairo_region_t *clip,
|
|
GskRenderNode *node,
|
|
const graphene_rect_t *viewport,
|
|
GskRenderPassType pass_type);
|
|
GskGpuImage * gsk_gpu_node_processor_convert_image (GskGpuFrame *frame,
|
|
GdkMemoryFormat target_format,
|
|
GdkColorState *target_color_state,
|
|
GskGpuImage *image,
|
|
GdkColorState *image_color_state);
|
|
|
|
G_END_DECLS
|