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

Side by Side Diff: gpu/ipc/service/gpu_channel.h

Issue 2601993002: Remove base::ScopedPtrHashMap from gpu/ipc/service/. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | gpu/ipc/service/gpu_channel.cc » ('j') | gpu/ipc/service/gpu_channel.cc » ('J')
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 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_H_
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_ 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <unordered_map>
13 14
14 #include "base/containers/hash_tables.h" 15 #include "base/containers/hash_tables.h"
15 #include "base/containers/scoped_ptr_hash_map.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/process/process.h" 19 #include "base/process/process.h"
20 #include "base/threading/thread_checker.h" 20 #include "base/threading/thread_checker.h"
21 #include "base/trace_event/memory_dump_provider.h" 21 #include "base/trace_event/memory_dump_provider.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "gpu/gpu_export.h" 23 #include "gpu/gpu_export.h"
24 #include "gpu/ipc/common/gpu_stream_constants.h" 24 #include "gpu/ipc/common/gpu_stream_constants.h"
25 #include "gpu/ipc/service/gpu_command_buffer_stub.h" 25 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 #if defined(OS_ANDROID) 171 #if defined(OS_ANDROID)
172 const GpuCommandBufferStub* GetOneStub() const; 172 const GpuCommandBufferStub* GetOneStub() const;
173 #endif 173 #endif
174 174
175 protected: 175 protected:
176 // The message filter on the io thread. 176 // The message filter on the io thread.
177 scoped_refptr<GpuChannelMessageFilter> filter_; 177 scoped_refptr<GpuChannelMessageFilter> filter_;
178 178
179 // Map of routing id to command buffer stub. 179 // Map of routing id to command buffer stub.
180 base::ScopedPtrHashMap<int32_t, std::unique_ptr<GpuCommandBufferStub>> stubs_; 180 std::unordered_map<int32_t, std::unique_ptr<GpuCommandBufferStub>> stubs_;
181 181
182 private: 182 private:
183 friend class TestGpuChannel; 183 friend class TestGpuChannel;
184 184
185 bool OnControlMessageReceived(const IPC::Message& msg); 185 bool OnControlMessageReceived(const IPC::Message& msg);
186 186
187 void HandleMessage(const scoped_refptr<GpuChannelMessageQueue>& queue); 187 void HandleMessage(const scoped_refptr<GpuChannelMessageQueue>& queue);
188 188
189 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are 189 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are
190 // processed as soon as possible because the client is blocked until they 190 // processed as soon as possible because the client is blocked until they
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 scoped_refptr<PreemptionFlag> preempting_flag_; 471 scoped_refptr<PreemptionFlag> preempting_flag_;
472 scoped_refptr<PreemptionFlag> preempted_flag_; 472 scoped_refptr<PreemptionFlag> preempted_flag_;
473 SyncPointManager* const sync_point_manager_; 473 SyncPointManager* const sync_point_manager_;
474 474
475 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); 475 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue);
476 }; 476 };
477 477
478 } // namespace gpu 478 } // namespace gpu
479 479
480 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ 480 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/service/gpu_channel.cc » ('j') | gpu/ipc/service/gpu_channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698