diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 04:52:50 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 04:52:50 +0000 |
commit | 4169f306f3cef291616fbcf3d7950056ce504cb5 (patch) | |
tree | e0bd18c4a24118c7730bb2f26ac6e2fee126732c /gpu | |
parent | ea3125a9e0d7bd0074051bc995b7b4ae8a189b3e (diff) | |
download | chromium_src-4169f306f3cef291616fbcf3d7950056ce504cb5.zip chromium_src-4169f306f3cef291616fbcf3d7950056ce504cb5.tar.gz chromium_src-4169f306f3cef291616fbcf3d7950056ce504cb5.tar.bz2 |
Revert 116821 - Make StrictSharedIdHandler free its unused ids.
TEST=none
BUG=109330,109575
Review URL: http://codereview.chromium.org/9109030
TBR=gman@chromium.org
Review URL: http://codereview.chromium.org/9147001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 24 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation_unittest.cc | 6 |
2 files changed, 3 insertions, 27 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index d3f9054..ccbffc8 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -143,9 +143,7 @@ class StrictSharedIdHandler : public IdHandlerInterface { id_namespace_(id_namespace) { } - virtual ~StrictSharedIdHandler() { - Destroy(); - } + virtual ~StrictSharedIdHandler() { } virtual void MakeIds(GLuint id_offset, GLsizei n, GLuint* ids) { for (GLsizei ii = 0; ii < n; ++ii) { @@ -187,19 +185,6 @@ class StrictSharedIdHandler : public IdHandlerInterface { typedef std::queue<GLuint> ResourceIdQueue; typedef std::set<GLuint> ResourceIdSet; - void Destroy() { - // Free all the ids not being used. - while (!free_ids_.empty()) { - GLuint ids[kNumIdsToGet]; - int count = 0; - while (count < kNumIdsToGet && !free_ids_.empty()) { - ids[count++] = free_ids_.front(); - free_ids_.pop(); - } - gles2_->DeleteSharedIdsCHROMIUM(id_namespace_, count, ids); - } - } - GLuint GetId(GLuint id_offset) { if (free_ids_.empty()) { GLuint ids[kNumIdsToGet]; @@ -738,11 +723,6 @@ GLES2Implementation::~GLES2Implementation() { #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); #endif - for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) { - id_handlers_[i].reset(); - } - // Make sure the commands make it the service. - Finish(); } void GLES2Implementation::SetSharedMemoryChunkSizeMultiple( diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index 46f60ae..dc94ad3 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -16,7 +16,6 @@ #endif using testing::_; -using testing::AnyNumber; using testing::DoAll; using testing::InSequence; using testing::Invoke; @@ -448,9 +447,6 @@ class GLES2ImplementationTest : public GLES2CommandBufferTestBase { } virtual void TearDown() { - Mock::VerifyAndClear(gl_.get()); - EXPECT_CALL(*command_buffer_, OnFlush(_)).Times(AnyNumber()); - gl_.reset(); } void Initialize(bool shared_resources, bool bind_generates_resource) { |