| 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_
|
|
|