mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibSoftGPU: Use default construction to clear AlphaBlendFactors
Clearing the `m_alpha_blend_factors` is performed manually and in separate steps. This is error prone for future developers. The behavior is to reset the entire `struct` to the same state as default initialization, so this simplifies it to do just that.
This commit is contained in:
parent
229188b815
commit
d1a87f1219
1 changed files with 1 additions and 11 deletions
|
@ -97,11 +97,7 @@ Gfx::IntRect Device::window_coordinates_to_target_coordinates(Gfx::IntRect const
|
||||||
|
|
||||||
void Device::setup_blend_factors()
|
void Device::setup_blend_factors()
|
||||||
{
|
{
|
||||||
m_alpha_blend_factors.src_constant = { 0.0f, 0.0f, 0.0f, 0.0f };
|
m_alpha_blend_factors = {};
|
||||||
m_alpha_blend_factors.src_factor_src_alpha = 0;
|
|
||||||
m_alpha_blend_factors.src_factor_dst_alpha = 0;
|
|
||||||
m_alpha_blend_factors.src_factor_src_color = 0;
|
|
||||||
m_alpha_blend_factors.src_factor_dst_color = 0;
|
|
||||||
|
|
||||||
switch (m_options.blend_source_factor) {
|
switch (m_options.blend_source_factor) {
|
||||||
case BlendFactor::Zero:
|
case BlendFactor::Zero:
|
||||||
|
@ -142,12 +138,6 @@ void Device::setup_blend_factors()
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_alpha_blend_factors.dst_constant = { 0.0f, 0.0f, 0.0f, 0.0f };
|
|
||||||
m_alpha_blend_factors.dst_factor_src_alpha = 0;
|
|
||||||
m_alpha_blend_factors.dst_factor_dst_alpha = 0;
|
|
||||||
m_alpha_blend_factors.dst_factor_src_color = 0;
|
|
||||||
m_alpha_blend_factors.dst_factor_dst_color = 0;
|
|
||||||
|
|
||||||
switch (m_options.blend_destination_factor) {
|
switch (m_options.blend_destination_factor) {
|
||||||
case BlendFactor::Zero:
|
case BlendFactor::Zero:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue