summaryrefslogtreecommitdiff
path: root/libs/rs/rsProgramFragmentStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsProgramFragmentStore.cpp')
-rw-r--r--libs/rs/rsProgramFragmentStore.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/rs/rsProgramFragmentStore.cpp b/libs/rs/rsProgramFragmentStore.cpp
index 9ee270f2226e..27f401532886 100644
--- a/libs/rs/rsProgramFragmentStore.cpp
+++ b/libs/rs/rsProgramFragmentStore.cpp
@@ -48,8 +48,13 @@ ProgramFragmentStore::~ProgramFragmentStore()
{
}
-void ProgramFragmentStore::setupGL()
+void ProgramFragmentStore::setupGL(ProgramFragmentStoreState *state)
{
+ if (state->mLast.get() == this) {
+ return;
+ }
+ state->mLast.set(this);
+
glColorMask(mColorRWriteEnable,
mColorGWriteEnable,
mColorBWriteEnable,
@@ -123,7 +128,7 @@ void ProgramFragmentStore::setDepthMask(bool mask)
void ProgramFragmentStore::setBlendFunc(RsBlendSrcFunc src, RsBlendDstFunc dst)
{
mBlendEnable = true;
- if ((src == RS_BLEND_SRC_ONE) &&
+ if ((src == RS_BLEND_SRC_ONE) &&
(dst == RS_BLEND_DST_ZERO)) {
mBlendEnable = false;
}