Context: Use Observer pattern for container objects.
Container objects in this case are the Vertex Array and Read and Draw
Framebuffers. Instead of using a mutable dirty bit state with a const
function to notify of dirty bits we can use the Observer/Subject
pattern. This more cleanly allows us to do cache updates.
Bug: angleproject:1391
Change-Id: I88f863894ec3efa00322038f323a84850166107d
Reviewed-on: https://chromium-review.googlesource.com/1153399
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index ec5a9a1..adcda6c 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -1851,7 +1851,7 @@
{
ASSERT(!mDirtyBitsGuard.valid() || mDirtyBitsGuard.value().test(index));
mDirtyBits.set(index);
- context->getGLState().setFramebufferDirty(this);
+ onStateChange(context, angle::SubjectMessage::CONTENTS_CHANGED);
return;
}