Blender V5.3
blender::PreviewLoadJob Class Reference

Icon Preview

 PreviewLoadJob ()
 ~PreviewLoadJob ()
void push_load_request (PreviewImage *preview, eIconSizes icon_size)
static PreviewLoadJob & ensure_job (wmWindowManager *wm, wmWindow *win)
static void load_jobless (PreviewImage *preview, eIconSizes icon_size)
static void on_download_requested (StringRef preview_full_filepath)
static void on_download_completed (wmWindowManager *wm, StringRef preview_full_filepath)

Detailed Description

Background job to manage requests for deferred loading of previews from the hard drive.

Launches a single job to manage all incoming preview requests. The job is kept running until all preview requests are done loading (or it's otherwise aborted, e.g. by closing Blender).

Note that this will use the OS thumbnail cache, i.e. load a preview from there or add it if not there yet. These two cases may lead to different performance.

This class also supports previews that need downloading before being available for loading from disk. The download itself isn't managed by this class, but it should be informed about the download status using ED_preview_online_download_requested() and ED_preview_online_download_finished(). This only works for previews where BKE_previewimg_is_online() returns true.

Definition at line 1735 of file render_preview.cc.

Constructor & Destructor Documentation

◆ PreviewLoadJob()

blender::PreviewLoadJob::PreviewLoadJob ( )

Definition at line 1828 of file render_preview.cc.

References blender::BLI_thread_queue_init().

Referenced by ensure_job(), load_jobless(), and on_download_completed().

◆ ~PreviewLoadJob()

blender::PreviewLoadJob::~PreviewLoadJob ( )

Definition at line 1830 of file render_preview.cc.

References blender::BLI_thread_queue_free().

Member Function Documentation

◆ ensure_job()

◆ load_jobless()

void blender::PreviewLoadJob::load_jobless ( PreviewImage * preview,
eIconSizes icon_size )
static

Definition at line 1860 of file render_preview.cc.

References PreviewLoadJob(), and push_load_request().

Referenced by blender::ED_preview_icon_render().

◆ on_download_completed()

void blender::PreviewLoadJob::on_download_completed ( wmWindowManager * wm,
StringRef preview_full_filepath )
static

◆ on_download_requested()

void blender::PreviewLoadJob::on_download_requested ( StringRef preview_full_filepath)
static

Definition at line 2033 of file render_preview.cc.

Referenced by blender::ED_preview_online_download_requested().

◆ push_load_request()


The documentation for this class was generated from the following file: