... and use it for the dmabuf downloader Splits the download op into 2 separate ops: One for downloading textures and one for downloading into preallocated memory. The download into memory is the fallback for the texture downloading op, so they need to share code. But keeping them separate ensures that the different codepaths for dmabuf download and render_texture() don't get mixed up in weird ways that potentially call into each other. By passing the emory down into the op we can also avoid an extra memcpy which can lead to quite large speedups for big textures.
21 lines
1.3 KiB
C
21 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include "gskgpuopprivate.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
void gsk_gpu_download_op (GskGpuFrame *frame,
|
|
GskGpuImage *image,
|
|
GdkColorState *color_state,
|
|
GdkTexture **out_texture);
|
|
void gsk_gpu_download_into_op (GskGpuFrame *frame,
|
|
GskGpuImage *image,
|
|
GdkColorState *image_color_state,
|
|
GdkMemoryFormat format,
|
|
GdkColorState *color_state,
|
|
guchar *data,
|
|
gsize stride);
|
|
|
|
G_END_DECLS
|
|
|