Move Buffer Subject/Observer to front end.

This makes BufferImpl into an Observer Subject. It also refactors
the Vertex Array updates for the D3D11 backend use more of a dirty
bit coding style.

This change makes it so Buffer contents changes trigger front-end
dirty bits from the back-end, which may be undesirable.

Bug: angleproject:2389
Change-Id: Iac8ce1171284a86851c18cd1373ddf24fcefe40b
Reviewed-on: https://chromium-review.googlesource.com/979812
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/gl/VertexArrayGL.cpp b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
index 329a2f4..4deb42a 100644
--- a/src/libANGLE/renderer/gl/VertexArrayGL.cpp
+++ b/src/libANGLE/renderer/gl/VertexArrayGL.cpp
@@ -716,6 +716,9 @@
                 updateElementArrayBufferBinding(context);
                 break;
 
+            case VertexArray::DIRTY_BIT_ELEMENT_ARRAY_BUFFER_DATA:
+                break;
+
             default:
             {
                 ASSERT(dirtyBit >= VertexArray::DIRTY_BIT_ATTRIB_0);
@@ -724,11 +727,15 @@
                 {
                     syncDirtyAttrib(context, index, attribBits[index]);
                 }
+                else if (dirtyBit < VertexArray::DIRTY_BIT_BINDING_MAX)
+                {
+                    ASSERT(dirtyBit >= VertexArray::DIRTY_BIT_BINDING_0);
+                    syncDirtyBinding(context, index, bindingBits[index]);
+                }
                 else
                 {
-                    ASSERT(dirtyBit >= VertexArray::DIRTY_BIT_BINDING_0 &&
-                           dirtyBit < VertexArray::DIRTY_BIT_BINDING_MAX);
-                    syncDirtyBinding(context, index, bindingBits[index]);
+                    ASSERT(dirtyBit >= VertexArray::DIRTY_BIT_BUFFER_DATA_0 &&
+                           dirtyBit < VertexArray::DIRTY_BIT_BUFFER_DATA_MAX);
                 }
                 break;
             }
@@ -751,4 +758,4 @@
     }
 }
 
-}  // rx
+}  // namespace rx