Rename colour to color in public API code

* Following the principle of least surprise, color tends to be more
  commonly used in APIs and graphics code even outside the USA.
This commit is contained in:
baldurk
2017-04-18 14:57:37 +01:00
parent d94f387399
commit 637d4089e2
47 changed files with 149 additions and 150 deletions
+2 -2
View File
@@ -104,9 +104,9 @@ struct SPIRVDisassembler
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_HideAPICalls, false) \
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ApplyColours, true) \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ApplyColors, true) \
\
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ColourEventRow, true) \
CONFIG_SETTING_VAL(public, bool, bool, EventBrowser_ColorEventRow, true) \
\
CONFIG_SETTING_VAL(public, int, int, Formatter_MinFigures, 2) \
\
+4 -4
View File
@@ -73,8 +73,8 @@ QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype)
case ResourceUsage::CS_RWResource: return "CS - UAV";
case ResourceUsage::All_RWResource: return "All - UAV";
case ResourceUsage::InputTarget: return "Colour Input";
case ResourceUsage::ColourTarget: return "Rendertarget";
case ResourceUsage::InputTarget: return "Color Input";
case ResourceUsage::ColorTarget: return "Rendertarget";
case ResourceUsage::DepthStencilTarget: return "Depthstencil";
case ResourceUsage::Indirect: return "Indirect argument";
@@ -129,7 +129,7 @@ QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype)
case ResourceUsage::All_RWResource: return "All - Image/SSBO";
case ResourceUsage::InputTarget: return "FBO Input";
case ResourceUsage::ColourTarget: return "FBO Colour";
case ResourceUsage::ColorTarget: return "FBO Color";
case ResourceUsage::DepthStencilTarget: return "FBO Depthstencil";
case ResourceUsage::Indirect: return "Indirect argument";
@@ -215,7 +215,7 @@ QString D3DSemanticString(const SigParameter &sig)
QString ret = ToQStr(sig.systemValue);
// need to include the index if it's a system value semantic that's numbered
if(sig.systemValue == ShaderBuiltin::ColourOutput ||
if(sig.systemValue == ShaderBuiltin::ColorOutput ||
sig.systemValue == ShaderBuiltin::CullDistance || sig.systemValue == ShaderBuiltin::ClipDistance)
ret += QString::number(sig.semanticIndex);
+2 -2
View File
@@ -123,7 +123,7 @@ struct ToStr
switch(el)
{
case AlphaMapping::Discard: return "Discard";
case AlphaMapping::BlendToColour: return "Blend to Colour";
case AlphaMapping::BlendToColor: return "Blend to Color";
case AlphaMapping::BlendToCheckerboard: return "Blend to Checkerboard";
case AlphaMapping::Preserve: return "Preserve";
default: break;
@@ -284,7 +284,7 @@ struct ToStr
case ShaderBuiltin::PatchNumVertices: return "Patch NumVertices";
case ShaderBuiltin::OuterTessFactor: return "Outer TessFactor";
case ShaderBuiltin::InsideTessFactor: return "Inside TessFactor";
case ShaderBuiltin::ColourOutput: return "Colour Output";
case ShaderBuiltin::ColorOutput: return "Color Output";
case ShaderBuiltin::DepthOutput: return "Depth Output";
case ShaderBuiltin::DepthOutputGreaterEqual: return "Depth Output (GEqual)";
case ShaderBuiltin::DepthOutputLessEqual: return "Depth Output (LEqual)";
@@ -77,11 +77,11 @@ SettingsDialog::SettingsDialog(CaptureContext &ctx, QWidget *parent)
ui->EventBrowser_TimeUnit->setCurrentIndex((int)m_Ctx.Config.EventBrowser_TimeUnit);
ui->EventBrowser_HideEmpty->setChecked(m_Ctx.Config.EventBrowser_HideEmpty);
ui->EventBrowser_HideAPICalls->setChecked(m_Ctx.Config.EventBrowser_HideAPICalls);
ui->EventBrowser_ApplyColours->setChecked(m_Ctx.Config.EventBrowser_ApplyColours);
ui->EventBrowser_ColourEventRow->setChecked(m_Ctx.Config.EventBrowser_ColourEventRow);
ui->EventBrowser_ApplyColors->setChecked(m_Ctx.Config.EventBrowser_ApplyColors);
ui->EventBrowser_ColorEventRow->setChecked(m_Ctx.Config.EventBrowser_ColorEventRow);
// disable sub-checkbox
ui->EventBrowser_ColourEventRow->setEnabled(ui->EventBrowser_ApplyColours->isChecked());
ui->EventBrowser_ColorEventRow->setEnabled(ui->EventBrowser_ApplyColors->isChecked());
ui->Formatter_MinFigures->setValue(m_Ctx.Config.Formatter_MinFigures);
ui->Formatter_MaxFigures->setValue(m_Ctx.Config.Formatter_MaxFigures);
@@ -301,16 +301,16 @@ void SettingsDialog::on_EventBrowser_HideAPICalls_toggled(bool checked)
m_Ctx.Config.Save();
}
void SettingsDialog::on_EventBrowser_ApplyColours_toggled(bool checked)
void SettingsDialog::on_EventBrowser_ApplyColors_toggled(bool checked)
{
m_Ctx.Config.EventBrowser_ApplyColours = ui->EventBrowser_ApplyColours->isChecked();
m_Ctx.Config.EventBrowser_ApplyColors = ui->EventBrowser_ApplyColors->isChecked();
m_Ctx.Config.Save();
}
void SettingsDialog::on_EventBrowser_ColourEventRow_toggled(bool checked)
void SettingsDialog::on_EventBrowser_ColorEventRow_toggled(bool checked)
{
m_Ctx.Config.EventBrowser_ColourEventRow = ui->EventBrowser_ColourEventRow->isChecked();
m_Ctx.Config.EventBrowser_ColorEventRow = ui->EventBrowser_ColorEventRow->isChecked();
m_Ctx.Config.Save();
}
+2 -2
View File
@@ -77,8 +77,8 @@ private slots:
void on_EventBrowser_TimeUnit_currentIndexChanged(int index);
void on_EventBrowser_HideEmpty_toggled(bool checked);
void on_EventBrowser_HideAPICalls_toggled(bool checked);
void on_EventBrowser_ApplyColours_toggled(bool checked);
void on_EventBrowser_ColourEventRow_toggled(bool checked);
void on_EventBrowser_ApplyColors_toggled(bool checked);
void on_EventBrowser_ColorEventRow_toggled(bool checked);
// android
void on_browseTempCaptureDirectory_clicked();
+8 -8
View File
@@ -784,9 +784,9 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="EventBrowser_ApplyColours">
<widget class="QCheckBox" name="EventBrowser_ApplyColors">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be coloured with an API-specified colour.
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color.
</string>
</property>
<property name="text">
@@ -795,9 +795,9 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="EventBrowser_ColourEventRow">
<widget class="QCheckBox" name="EventBrowser_ColorEventRow">
<property name="toolTip">
<string>When colouring marker sections in the Event Browser, the whole row of a marker region will be coloured, not just a bar to the left of its children.</string>
<string>When coloring marker sections in the Event Browser, the whole row of a marker region will be colored, not just a bar to the left of its children.</string>
</property>
<property name="text">
<string/>
@@ -807,21 +807,21 @@ If {spv_disas} is not used, the tool is expected to output the disassembly on st
<item row="3" column="0">
<widget class="QLabel" name="label_22">
<property name="toolTip">
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be coloured with an API-specified colour.
<string>In the Event Browser and Timeline Bar, marker sections and marker labels will be colored with an API-specified color.
</string>
</property>
<property name="text">
<string>Apply marker colours (requires file reload)</string>
<string>Apply marker colors (requires file reload)</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_23">
<property name="toolTip">
<string>When colouring marker sections in the Event Browser, the whole row of a marker region will be coloured, not just a bar to the left of its children.</string>
<string>When coloring marker sections in the Event Browser, the whole row of a marker region will be colored, not just a bar to the left of its children.</string>
</property>
<property name="text">
<string> - Colourise whole row for marker regions</string>
<string> - Colorise whole row for marker regions</string>
</property>
</widget>
</item>
@@ -185,7 +185,7 @@ void TextureSaveDialog::on_fileFormat_currentIndexChanged(int index)
ui->alphaMap->setEnabled(tex.format.compCount == 4 && noAlphaFormat);
ui->alphaCol->setEnabled(saveData.alpha == AlphaMapping::BlendToColour &&
ui->alphaCol->setEnabled(saveData.alpha == AlphaMapping::BlendToColor &&
tex.format.compCount == 4 && noAlphaFormat);
if(saveData.destType == FileType::DDS)
@@ -472,7 +472,7 @@ void TextureSaveDialog::on_alphaMap_currentIndexChanged(int index)
{
saveData.alpha = (AlphaMapping)index;
ui->alphaCol->setEnabled(saveData.alpha == AlphaMapping::BlendToColour);
ui->alphaCol->setEnabled(saveData.alpha == AlphaMapping::BlendToColor);
}
void TextureSaveDialog::on_blackPoint_textEdited(const QString &arg)
@@ -1651,7 +1651,7 @@ void GLPipelineStateViewer::setState()
{
if(state.m_FS.ShaderDetails->OutputSig[s].regIndex == (uint32_t)db &&
(state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::Undefined ||
state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::ColourOutput))
state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::ColorOutput))
{
name = QString("<%1>").arg(ToQStr(state.m_FS.ShaderDetails->OutputSig[s].varName));
}
@@ -1819,7 +1819,7 @@ void VulkanPipelineStateViewer::setState()
{
if(state.m_FS.ShaderDetails->OutputSig[s].regIndex == (uint32_t)colIdx &&
(state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::Undefined ||
state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::ColourOutput))
state.m_FS.ShaderDetails->OutputSig[s].systemValue == ShaderBuiltin::ColorOutput))
{
name = QString("<%1>").arg(ToQStr(state.m_FS.ShaderDetails->OutputSig[s].varName));
}
+17 -17
View File
@@ -2480,9 +2480,9 @@ void TextureViewer::OnLogfileLoaded()
model->reset(TextureListItemModel::String, "", m_Ctx);
m_TexDisplay.darkBackgroundColour =
m_TexDisplay.darkBackgroundColor =
FloatVector(darkBack.redF(), darkBack.greenF(), darkBack.blueF(), 1.0f);
m_TexDisplay.lightBackgroundColour =
m_TexDisplay.lightBackgroundColor =
FloatVector(lightBack.redF(), lightBack.greenF(), lightBack.blueF(), 1.0f);
m_Ctx.Renderer().BlockInvoke([renderID, contextID, this](IReplayRenderer *r) {
@@ -2513,9 +2513,9 @@ void TextureViewer::Reset()
m_CachedTexture = NULL;
memset(&m_TexDisplay, 0, sizeof(m_TexDisplay));
m_TexDisplay.darkBackgroundColour =
m_TexDisplay.darkBackgroundColor =
FloatVector(darkBack.redF(), darkBack.greenF(), darkBack.blueF(), 1.0f);
m_TexDisplay.lightBackgroundColour =
m_TexDisplay.lightBackgroundColor =
FloatVector(lightBack.redF(), lightBack.greenF(), lightBack.blueF(), 1.0f);
m_Output = NULL;
@@ -2730,9 +2730,9 @@ void TextureViewer::setPersistData(const QVariant &persistData)
ui->checkerBack->setChecked(false);
}
m_TexDisplay.darkBackgroundColour =
m_TexDisplay.darkBackgroundColor =
FloatVector(darkBack.redF(), darkBack.greenF(), darkBack.blueF(), 1.0f);
m_TexDisplay.lightBackgroundColour =
m_TexDisplay.lightBackgroundColor =
FloatVector(lightBack.redF(), lightBack.greenF(), lightBack.blueF(), 1.0f);
ui->render->setColours(darkBack, lightBack);
@@ -3061,7 +3061,7 @@ void TextureViewer::on_backcolorPick_clicked()
col = QColor(0, 0, 0);
col = col.toRgb();
m_TexDisplay.darkBackgroundColour = m_TexDisplay.lightBackgroundColour =
m_TexDisplay.darkBackgroundColor = m_TexDisplay.lightBackgroundColor =
FloatVector(col.redF(), col.greenF(), col.blueF(), 1.0f);
darkBack = lightBack = col;
@@ -3086,16 +3086,16 @@ void TextureViewer::on_checkerBack_clicked()
ui->checkerBack->setChecked(true);
ui->backcolorPick->setChecked(false);
m_TexDisplay.lightBackgroundColour = FloatVector(0.81f, 0.81f, 0.81f, 1.0f);
m_TexDisplay.darkBackgroundColour = FloatVector(0.57f, 0.57f, 0.57f, 1.0f);
m_TexDisplay.lightBackgroundColor = FloatVector(0.81f, 0.81f, 0.81f, 1.0f);
m_TexDisplay.darkBackgroundColor = FloatVector(0.57f, 0.57f, 0.57f, 1.0f);
darkBack = QColor::fromRgb(int(m_TexDisplay.darkBackgroundColour.x * 255.0f),
int(m_TexDisplay.darkBackgroundColour.y * 255.0f),
int(m_TexDisplay.darkBackgroundColour.z * 255.0f));
darkBack = QColor::fromRgb(int(m_TexDisplay.darkBackgroundColor.x * 255.0f),
int(m_TexDisplay.darkBackgroundColor.y * 255.0f),
int(m_TexDisplay.darkBackgroundColor.z * 255.0f));
lightBack = QColor::fromRgb(int(m_TexDisplay.lightBackgroundColour.x * 255.0f),
int(m_TexDisplay.lightBackgroundColour.y * 255.0f),
int(m_TexDisplay.lightBackgroundColour.z * 255.0f));
lightBack = QColor::fromRgb(int(m_TexDisplay.lightBackgroundColor.x * 255.0f),
int(m_TexDisplay.lightBackgroundColor.y * 255.0f),
int(m_TexDisplay.lightBackgroundColor.z * 255.0f));
ui->render->setColours(darkBack, lightBack);
ui->pixelContext->setColours(darkBack, lightBack);
@@ -3255,10 +3255,10 @@ void TextureViewer::on_saveTex_clicked()
config.comp.blackPoint = m_TexDisplay.rangemin;
config.comp.whitePoint = m_TexDisplay.rangemax;
config.alphaCol = m_TexDisplay.lightBackgroundColour;
config.alphaCol = m_TexDisplay.lightBackgroundColor;
config.alpha = m_TexDisplay.Alpha ? AlphaMapping::BlendToCheckerboard : AlphaMapping::Discard;
if(m_TexDisplay.Alpha && !ui->checkerBack->isChecked())
config.alpha = AlphaMapping::BlendToColour;
config.alpha = AlphaMapping::BlendToColor;
if(m_TexDisplay.CustomShader != ResourceId())
{