diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-05 22:08:44 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-05 22:08:44 +0000 |
commit | ef74db9e36d14bdfe71089403a393561c3f53b6f (patch) | |
tree | c9482e4df2ebd1aac695f6c3de6cf2a713a954cb /gpu | |
parent | 66ceee851666a65c6aa8ae64dfb36ba104c95cb3 (diff) | |
download | chromium_src-ef74db9e36d14bdfe71089403a393561c3f53b6f.zip chromium_src-ef74db9e36d14bdfe71089403a393561c3f53b6f.tar.gz chromium_src-ef74db9e36d14bdfe71089403a393561c3f53b6f.tar.bz2 |
command_buffer: Remove hash_tables.h, simplify atomicops.h
command_buffer was historically included in nacl-compiled things, and base
wasn't. These days, base is included in nacl-compiled things too, so the
duplication can be removed.
BUG=none
R=piman@chromium.org
Review URL: https://codereview.chromium.org/58913003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/client/atomicops.cc | 8 | ||||
-rw-r--r-- | gpu/command_buffer/client/atomicops.h | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/buffer_tracker.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/gpu_memory_buffer_tracker.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/hash_tables.h | 24 | ||||
-rw-r--r-- | gpu/command_buffer/client/query_tracker.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/query_tracker.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer/client/vertex_array_object_manager.h | 4 | ||||
-rw-r--r-- | gpu/command_buffer_client.gypi | 1 |
9 files changed, 9 insertions, 44 deletions
diff --git a/gpu/command_buffer/client/atomicops.cc b/gpu/command_buffer/client/atomicops.cc index ef68f9e..c66fc05 100644 --- a/gpu/command_buffer/client/atomicops.cc +++ b/gpu/command_buffer/client/atomicops.cc @@ -15,14 +15,6 @@ namespace gpu { -void MemoryBarrier() { -#if defined(__native_client__) - __sync_synchronize(); -#else - base::subtle::MemoryBarrier(); -#endif -} - #if defined(__native_client__) class LockImpl { diff --git a/gpu/command_buffer/client/atomicops.h b/gpu/command_buffer/client/atomicops.h index 9e1628e..43044b6 100644 --- a/gpu/command_buffer/client/atomicops.h +++ b/gpu/command_buffer/client/atomicops.h @@ -11,8 +11,6 @@ namespace gpu { -GPU_EXPORT void MemoryBarrier(); - class LockImpl; class GPU_EXPORT Lock { public: diff --git a/gpu/command_buffer/client/buffer_tracker.h b/gpu/command_buffer/client/buffer_tracker.h index e61c501..3e50364 100644 --- a/gpu/command_buffer/client/buffer_tracker.h +++ b/gpu/command_buffer/client/buffer_tracker.h @@ -8,8 +8,8 @@ #include <GLES2/gl2.h> #include <queue> +#include "base/containers/hash_tables.h" #include "gles2_impl_export.h" -#include "gpu/command_buffer/client/hash_tables.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" namespace gpu { @@ -99,7 +99,7 @@ class GLES2_IMPL_EXPORT BufferTracker { void FreePendingToken(Buffer*, int32 token); private: - typedef gpu::hash_map<GLuint, Buffer*> BufferMap; + typedef base::hash_map<GLuint, Buffer*> BufferMap; MappedMemoryManager* mapped_memory_; BufferMap buffers_; diff --git a/gpu/command_buffer/client/gpu_memory_buffer_tracker.h b/gpu/command_buffer/client/gpu_memory_buffer_tracker.h index 0b07dd0..84158818 100644 --- a/gpu/command_buffer/client/gpu_memory_buffer_tracker.h +++ b/gpu/command_buffer/client/gpu_memory_buffer_tracker.h @@ -6,8 +6,8 @@ #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_ #include "base/basictypes.h" +#include "base/containers/hash_tables.h" #include "gles2_impl_export.h" -#include "gpu/command_buffer/client/hash_tables.h" namespace gfx { class GpuMemoryBuffer; @@ -29,7 +29,7 @@ class GLES2_IMPL_EXPORT GpuMemoryBufferTracker { void RemoveBuffer(int32 image_id); private: - typedef gpu::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap; + typedef base::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap; BufferMap buffers_; GpuControl* gpu_control_; diff --git a/gpu/command_buffer/client/hash_tables.h b/gpu/command_buffer/client/hash_tables.h deleted file mode 100644 index fff3098..0000000 --- a/gpu/command_buffer/client/hash_tables.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef GPU_COMMAND_BUFFER_CLIENT_HASH_TABLES_H_ -#define GPU_COMMAND_BUFFER_CLIENT_HASH_TABLES_H_ - -#if defined(__native_client__) -#include <tr1/unordered_map> -namespace gpu { -template <typename key, typename value> -struct hash_map : public std::tr1::unordered_map<key, value> { -}; -} -#else -#include "base/containers/hash_tables.h" -namespace gpu { -template <typename key, typename value> -struct hash_map : public base::hash_map<key, value> { -}; -} -#endif - -#endif // GPU_COMMAND_BUFFER_CLIENT_HASH_TABLES_H_ diff --git a/gpu/command_buffer/client/query_tracker.cc b/gpu/command_buffer/client/query_tracker.cc index c128fbd..ac9d3f9 100644 --- a/gpu/command_buffer/client/query_tracker.cc +++ b/gpu/command_buffer/client/query_tracker.cc @@ -151,7 +151,7 @@ bool QueryTracker::Query::CheckResultsAvailable( helper->IsContextLost()) { // Need a MemoryBarrier here so that sync->result read after // sync->process_count. - gpu::MemoryBarrier(); + base::subtle::MemoryBarrier(); switch (target()) { case GL_COMMANDS_ISSUED_CHROMIUM: result_ = std::min(info_.sync->result, diff --git a/gpu/command_buffer/client/query_tracker.h b/gpu/command_buffer/client/query_tracker.h index 81861c9..9e7f501 100644 --- a/gpu/command_buffer/client/query_tracker.h +++ b/gpu/command_buffer/client/query_tracker.h @@ -10,8 +10,8 @@ #include <deque> #include <list> +#include "base/containers/hash_tables.h" #include "gles2_impl_export.h" -#include "gpu/command_buffer/client/hash_tables.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" namespace gpu { @@ -161,7 +161,7 @@ class GLES2_IMPL_EXPORT QueryTracker { void FreeCompletedQueries(); private: - typedef gpu::hash_map<GLuint, Query*> QueryMap; + typedef base::hash_map<GLuint, Query*> QueryMap; typedef std::list<Query*> QueryList; QueryMap queries_; diff --git a/gpu/command_buffer/client/vertex_array_object_manager.h b/gpu/command_buffer/client/vertex_array_object_manager.h index 254b15d..d5b07ec 100644 --- a/gpu/command_buffer/client/vertex_array_object_manager.h +++ b/gpu/command_buffer/client/vertex_array_object_manager.h @@ -6,9 +6,9 @@ #define GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ #include <GLES2/gl2.h> +#include "base/containers/hash_tables.h" #include "base/memory/scoped_ptr.h" #include "gles2_impl_export.h" -#include "gpu/command_buffer/client/hash_tables.h" #include "gpu/command_buffer/common/types.h" namespace gpu { @@ -93,7 +93,7 @@ class GLES2_IMPL_EXPORT VertexArrayObjectManager { GLuint bound_element_array_buffer() const; private: - typedef gpu::hash_map<GLuint, VertexArrayObject*> VertexArrayObjectMap; + typedef base::hash_map<GLuint, VertexArrayObject*> VertexArrayObjectMap; bool IsDefaultVAOBound() const; diff --git a/gpu/command_buffer_client.gypi b/gpu/command_buffer_client.gypi index b4d5b78..366f5b7 100644 --- a/gpu/command_buffer_client.gypi +++ b/gpu/command_buffer_client.gypi @@ -21,7 +21,6 @@ 'command_buffer/client/cmd_buffer_helper.h', 'command_buffer/client/fenced_allocator.cc', 'command_buffer/client/fenced_allocator.h', - 'command_buffer/client/hash_tables.h', 'command_buffer/client/mapped_memory.cc', 'command_buffer/client/mapped_memory.h', 'command_buffer/client/ring_buffer.cc', |