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

Side by Side Diff: gpu/command_buffer/common/value_state.h

Issue 1894313002: Removed implementation of CHROMIUM_subscribe_uniform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a couple more mus/ references Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/common/typemaps.gni ('k') | gpu/command_buffer/common/value_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_COMMON_VALUE_STATE_H_
6 #define GPU_COMMAND_BUFFER_COMMON_VALUE_STATE_H_
7
8 #include "base/containers/hash_tables.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "gpu/gpu_export.h"
12
13 namespace gpu {
14
15 // Used to maintain Valuebuffer state, exposed to browser to
16 // support passing ValueStates via IPC.
17 union GPU_EXPORT ValueState {
18 float float_value[4];
19 int int_value[4];
20 };
21
22 // Refcounted wrapper for a hash_map of subscription targets to ValueStates
23 class GPU_EXPORT ValueStateMap : public base::RefCounted<ValueStateMap> {
24 public:
25 ValueStateMap();
26
27 // Returns NULL if there is not ValueState for the target
28 const ValueState* GetState(unsigned int target) const;
29
30 void UpdateState(unsigned int target, const ValueState& state);
31
32 protected:
33 virtual ~ValueStateMap();
34
35 private:
36 friend class base::RefCounted<ValueStateMap>;
37
38 typedef base::hash_map<unsigned int, ValueState> Map;
39
40 Map state_map_;
41
42 DISALLOW_COPY_AND_ASSIGN(ValueStateMap);
43 };
44
45 } // namespace gpu
46
47 #endif // GPU_COMMAND_BUFFER_COMMON_VALUE_STATE_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/typemaps.gni ('k') | gpu/command_buffer/common/value_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698