Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: gpu/command_buffer/service/uniform_subscription_manager.h

Issue 659903002: Add subscribeUniform extension pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/uniform_subscription_manager.h
diff --git a/gpu/command_buffer/service/uniform_subscription_manager.h b/gpu/command_buffer/service/uniform_subscription_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..0606f56b794c2c336906b72bad8041cb85e442ef
--- /dev/null
+++ b/gpu/command_buffer/service/uniform_subscription_manager.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_
+#define GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_
+
+#include <map>
+
+#include "base/memory/ref_counted.h"
+#include "gpu/command_buffer/service/gl_utils.h"
+#include "gpu/gpu_export.h"
+
+namespace gpu {
+namespace gles2 {
+
+// This class keeps track of the mapping of uniform names to types,
+// along with the current uniform state
+class GPU_EXPORT UniformSubscriptionManager {
+ public:
+ typedef std::map<GLenum, const GLchar*> SubscriptionMap;
+
+ UniformSubscriptionManager();
+ ~UniformSubscriptionManager();
+
+ void Destroy(bool have_context);
+
+ void AddSubscription(GLenum target, const GLchar* name);
+ void RemoveSubscription(GLenum target);
+
+ SubscriptionMap subscriptions() { return subscriptions_; }
+
+ private:
+ SubscriptionMap subscriptions_;
+
+ DISALLOW_COPY_AND_ASSIGN(UniformSubscriptionManager);
+};
+
+} // namespage gles2
+} // namespace gpu
+
+#endif // GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698