Use active textures mask with robust init.

This should speed up clearUnclearedActiveTextures considerably.
It was showing up as a hotspot when running the aquarium demo with
the passthrough command decoder.

Also rename the complete textures mask in gl::State to an active
textures mask, since it includes incomplete textures.

BUG=angleproject:2188

Change-Id: Idf020fc49c1e74f17a8005c3b88516829767b84c
Reviewed-on: https://chromium-review.googlesource.com/722421
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index f6917f2..c4a132b 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2838,8 +2838,13 @@
 Error Context::prepareForDraw()
 {
     syncRendererState();
-    ANGLE_TRY(mGLState.clearUnclearedActiveTextures(this));
-    ANGLE_TRY(mGLState.getDrawFramebuffer()->ensureDrawAttachmentsInitialized(this));
+
+    if (isRobustResourceInitEnabled())
+    {
+        ANGLE_TRY(mGLState.clearUnclearedActiveTextures(this));
+        ANGLE_TRY(mGLState.getDrawFramebuffer()->ensureDrawAttachmentsInitialized(this));
+    }
+
     return NoError();
 }
 
@@ -4283,7 +4288,10 @@
     }
 
     // TODO(jmadill): Dirty bits for compute.
-    ANGLE_CONTEXT_TRY(mGLState.clearUnclearedActiveTextures(this));
+    if (isRobustResourceInitEnabled())
+    {
+        ANGLE_CONTEXT_TRY(mGLState.clearUnclearedActiveTextures(this));
+    }
 
     handleError(mImplementation->dispatchCompute(this, numGroupsX, numGroupsY, numGroupsZ));
 }