Blender  V2.93
COM_QualityStepHelper.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #include "COM_QualityStepHelper.h"
20 
21 namespace blender::compositor {
22 
24 {
25  this->m_quality = eCompositorQuality::High;
26  this->m_step = 1;
27  this->m_offsetadd = 4;
28 }
29 
31 {
32  switch (helper) {
33  case COM_QH_INCREASE:
34  switch (this->m_quality) {
36  default:
37  this->m_step = 1;
38  this->m_offsetadd = 1;
39  break;
41  this->m_step = 2;
42  this->m_offsetadd = 2;
43  break;
45  this->m_step = 3;
46  this->m_offsetadd = 3;
47  break;
48  }
49  break;
50  case COM_QH_MULTIPLY:
51  switch (this->m_quality) {
53  default:
54  this->m_step = 1;
55  this->m_offsetadd = 4;
56  break;
58  this->m_step = 2;
59  this->m_offsetadd = 8;
60  break;
62  this->m_step = 4;
63  this->m_offsetadd = 16;
64  break;
65  }
66  break;
67  }
68 }
69 
70 } // namespace blender::compositor