Add outline of new GrContext hierarchy

This begins the process of splitting GrContext into:

GrContext_Base, GrImageContext, GrRecordingContext and GrDirectContext.

Change-Id: I3c43045f2a5549b049e95791d65f74d4e16de36f
Reviewed-on: https://skia-review.googlesource.com/c/186878
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrContext_Base.cpp b/src/gpu/GrContext_Base.cpp
new file mode 100644
index 0000000..80e7a80
--- /dev/null
+++ b/src/gpu/GrContext_Base.cpp
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2019 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrContext_Base.h"
+
+static int32_t next_id() {
+    static std::atomic<int32_t> nextID{1};
+    int32_t id;
+    do {
+        id = nextID++;
+    } while (id == SK_InvalidGenID);
+    return id;
+}
+
+GrContext_Base::GrContext_Base(GrBackendApi backend,
+                               uint32_t uniqueID)
+        : fBackend(backend)
+        , fUniqueID(SK_InvalidGenID == uniqueID ? next_id() : uniqueID) {
+}
+
+GrContext_Base::~GrContext_Base() {
+}
+
+