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

Side by Side Diff: gpu/command_buffer/client/share_group.cc

Issue 10836116: Purge ImplementsThreadSafeReferenceCounting() from the codebase now that Task is dead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/test/browser_test_base.h ('k') | gpu/command_buffer/client/share_group_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "../client/atomicops.h" 5 #include "../client/atomicops.h"
6 #include "../client/share_group.h" 6 #include "../client/share_group.h"
7 #include "../client/gles2_implementation.h" 7 #include "../client/gles2_implementation.h"
8 #include "../client/program_info_manager.h" 8 #include "../client/program_info_manager.h"
9 #include "../common/id_allocator.h" 9 #include "../common/id_allocator.h"
10 #include "../common/logging.h" 10 #include "../common/logging.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 private: 191 private:
192 IdHandlerInterface* id_handler_; 192 IdHandlerInterface* id_handler_;
193 Lock lock_; 193 Lock lock_;
194 }; 194 };
195 195
196 ShareGroup::ShareGroup(bool share_resources, bool bind_generates_resource) 196 ShareGroup::ShareGroup(bool share_resources, bool bind_generates_resource)
197 : sharing_resources_(share_resources), 197 : sharing_resources_(share_resources),
198 bind_generates_resource_(bind_generates_resource), 198 bind_generates_resource_(bind_generates_resource),
199 gles2_(NULL) { 199 gles2_(NULL) {
200 GPU_CHECK(ShareGroup::ImplementsThreadSafeReferenceCounting());
201
202 if (bind_generates_resource) { 200 if (bind_generates_resource) {
203 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) { 201 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) {
204 if (i == id_namespaces::kProgramsAndShaders) { 202 if (i == id_namespaces::kProgramsAndShaders) {
205 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper( 203 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper(
206 new NonReusedIdHandler())); 204 new NonReusedIdHandler()));
207 } else { 205 } else {
208 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper( 206 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper(
209 new IdHandler())); 207 new IdHandler()));
210 } 208 }
211 } 209 }
(...skipping 22 matching lines...) Expand all
234 232
235 ShareGroup::~ShareGroup() { 233 ShareGroup::~ShareGroup() {
236 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) { 234 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) {
237 id_handlers_[i]->Destroy(gles2_); 235 id_handlers_[i]->Destroy(gles2_);
238 id_handlers_[i].reset(); 236 id_handlers_[i].reset();
239 } 237 }
240 } 238 }
241 239
242 } // namespace gles2 240 } // namespace gles2
243 } // namespace gpu 241 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/browser_test_base.h ('k') | gpu/command_buffer/client/share_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698