Skip to content

Commit

Permalink
Init Blend State color mask defaults.
Browse files Browse the repository at this point in the history
This is an unrelated code cleanup. Previously we would only init these
member variables in the gl::State initialization code.

Bug: angleproject:3611
Change-Id: I3aa34958ce5b00542d45ef63e0b32010b2eb3220
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1902188
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
  • Loading branch information
null77 authored and Commit Bot committed Nov 7, 2019
1 parent a5a04ac commit 652dbfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/libANGLE/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ void State::initialize(Context *context)
mNearZ = 0.0f;
mFarZ = 1.0f;

mBlend.colorMaskRed = true;
mBlend.colorMaskGreen = true;
mBlend.colorMaskBlue = true;
mBlend.colorMaskAlpha = true;

mActiveSampler = 0;

mVertexAttribCurrentValues.resize(caps.maxVertexAttributes);
Expand Down
4 changes: 4 additions & 0 deletions src/libANGLE/angletypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ BlendState::BlendState()
blendEquationAlpha = GL_FUNC_ADD;
sampleAlphaToCoverage = false;
dither = true;
colorMaskRed = true;
colorMaskGreen = true;
colorMaskBlue = true;
colorMaskAlpha = true;
}

BlendState::BlendState(const BlendState &other)
Expand Down

0 comments on commit 652dbfc

Please sign in to comment.