Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / gpu / command_buffer / common / value_state.cc
blobd4dcdc22665ee43468bf97a76b98e664a9e5c8bd
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.
5 #include "gpu/command_buffer/common/value_state.h"
7 namespace gpu {
9 ValueStateMap::ValueStateMap() {
12 ValueStateMap::~ValueStateMap() {
15 const ValueState* ValueStateMap::GetState(unsigned int target) const {
16 Map::const_iterator it = state_map_.find(target);
17 return it != state_map_.end() ? &it->second : NULL;
20 void ValueStateMap::UpdateState(unsigned int target, const ValueState& state) {
21 state_map_[target] = state;
24 } // namespace gpu