OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "gpu/command_buffer/service/gl_utils.h" |
| 12 #include "gpu/gpu_export.h" |
| 13 |
| 14 namespace gpu { |
| 15 namespace gles2 { |
| 16 |
| 17 // This class keeps track of the mapping of uniform names to types, |
| 18 // along with the current uniform state |
| 19 class GPU_EXPORT UniformSubscriptionManager { |
| 20 public: |
| 21 typedef std::map<GLenum, const GLchar*> SubscriptionMap; |
| 22 |
| 23 UniformSubscriptionManager(); |
| 24 ~UniformSubscriptionManager(); |
| 25 |
| 26 void Destroy(bool have_context); |
| 27 |
| 28 void AddSubscription(GLenum target, const GLchar* name); |
| 29 void RemoveSubscription(GLenum target); |
| 30 |
| 31 SubscriptionMap subscriptions() { return subscriptions_; } |
| 32 |
| 33 private: |
| 34 SubscriptionMap subscriptions_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(UniformSubscriptionManager); |
| 37 }; |
| 38 |
| 39 } // namespage gles2 |
| 40 } // namespace gpu |
| 41 |
| 42 #endif // GPU_COMMAND_BUFFER_SERVICE_UNIFORM_SUBSCRIPTION_MANAGER_H_ |
OLD | NEW |