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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.cc

Issue 5270010: Revert 67662 - FBTF: Remove unneeded headers from base/ (part 10)... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/buffer_manager.h" 5 #include "gpu/command_buffer/service/buffer_manager.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 7 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
9 9
10 namespace gpu { 10 namespace gpu {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 void BufferManager::RemoveBufferInfo(GLuint client_id) { 49 void BufferManager::RemoveBufferInfo(GLuint client_id) {
50 BufferInfoMap::iterator it = buffer_infos_.find(client_id); 50 BufferInfoMap::iterator it = buffer_infos_.find(client_id);
51 if (it != buffer_infos_.end()) { 51 if (it != buffer_infos_.end()) {
52 it->second->MarkAsDeleted(); 52 it->second->MarkAsDeleted();
53 buffer_infos_.erase(it); 53 buffer_infos_.erase(it);
54 } 54 }
55 } 55 }
56 56
57 void BufferManager::BufferInfo::set_target(GLenum target) {
58 DCHECK_EQ(target_, 0u); // you can only set this once.
59 target_ = target;
60 }
61
62 BufferManager::BufferInfo::BufferInfo(GLuint service_id) 57 BufferManager::BufferInfo::BufferInfo(GLuint service_id)
63 : service_id_(service_id), 58 : service_id_(service_id),
64 target_(0), 59 target_(0),
65 size_(0), 60 size_(0),
66 shadowed_(false) { 61 shadowed_(false) {
67 } 62 }
68 63
69 BufferManager::BufferInfo::~BufferInfo() { } 64 BufferManager::BufferInfo::~BufferInfo() { }
70 65
71 void BufferManager::BufferInfo::SetSize(GLsizeiptr size, bool shadow) { 66 void BufferManager::BufferInfo::SetSize(GLsizeiptr size, bool shadow) {
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return false; 199 return false;
205 } 200 }
206 if (info->target() == 0) { 201 if (info->target() == 0) {
207 info->set_target(target); 202 info->set_target(target);
208 } 203 }
209 return true; 204 return true;
210 } 205 }
211 206
212 } // namespace gles2 207 } // namespace gles2
213 } // namespace gpu 208 } // namespace gpu
209
210
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/buffer_manager.h ('k') | gpu/command_buffer/service/command_buffer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698