Welcome to mirror list, hosted at ThFree Co, Russian Federation.

COM_ChunkOrder.h « intern « compositor « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ef65d90dd3a19ccda160d5dba67e9ec6b094518b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2011 Blender Foundation. */

#pragma once

#ifdef WITH_CXX_GUARDEDALLOC
#  include "MEM_guardedalloc.h"
#endif

#include "BLI_sys_types.h"

#include "COM_ChunkOrderHotspot.h"

namespace blender::compositor {

/** Helper to determine the order how chunks are prioritized during execution. */
struct ChunkOrder {
  uint index = 0;
  int x = 0;
  int y = 0;
  double distance = 0.0;

  friend bool operator<(const ChunkOrder &a, const ChunkOrder &b);

  void update_distance(ChunkOrderHotspot *hotspots, uint len_hotspots);

#ifdef WITH_CXX_GUARDEDALLOC
  MEM_CXX_CLASS_ALLOC_FUNCS("COM:ChunkOrderHotspot")
#endif
};

}  // namespace blender::compositor