Invalidate completeness caches when enabling extensions.

Enabling extensions can cause framebuffers and textures to go from
incomplete to complete.

No functional changes from the API surface.

BUG=angleproject:1523
BUG=angleproject:1958

Change-Id: Iff686e1c292f6cf4921d6fffd7eb98bedaba828b
Reviewed-on: https://chromium-review.googlesource.com/468410
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/ResourceManager.cpp b/src/libANGLE/ResourceManager.cpp
index c60db2c..f51bed2 100644
--- a/src/libANGLE/ResourceManager.cpp
+++ b/src/libANGLE/ResourceManager.cpp
@@ -304,6 +304,17 @@
     return texture == 0 || mObjectMap.find(texture) != mObjectMap.end();
 }
 
+void TextureManager::invalidateTextureComplenessCache()
+{
+    for (auto &texture : mObjectMap)
+    {
+        if (texture.second)
+        {
+            texture.second->invalidateCompletenessCache();
+        }
+    }
+}
+
 // RenderbufferManager Implementation.
 
 // static
@@ -497,4 +508,15 @@
     return mObjectMap.find(framebuffer) != mObjectMap.end();
 }
 
+void FramebufferManager::invalidateFramebufferComplenessCache()
+{
+    for (auto &framebuffer : mObjectMap)
+    {
+        if (framebuffer.second)
+        {
+            framebuffer.second->invalidateCompletenessCache();
+        }
+    }
+}
+
 }  // namespace gl