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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.h

Issue 600693002: content: Cleanup GpuMemoryBufferImpl destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove scoped_refptr<> from sender param of DeletedGpuMemoryBuffer Created 6 years, 3 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
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 CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; 69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
70 virtual CreateCommandBufferResult CreateViewCommandBuffer( 70 virtual CreateCommandBufferResult CreateViewCommandBuffer(
71 int32 surface_id, 71 int32 surface_id,
72 const GPUCreateCommandBufferConfig& init_params, 72 const GPUCreateCommandBufferConfig& init_params,
73 int32 route_id) = 0; 73 int32 route_id) = 0;
74 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 74 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
75 size_t width, 75 size_t width,
76 size_t height, 76 size_t height,
77 unsigned internalformat, 77 unsigned internalformat,
78 unsigned usage) = 0; 78 unsigned usage) = 0;
79 virtual void DeleteGpuMemoryBuffer(
80 scoped_ptr<gfx::GpuMemoryBuffer> buffer) = 0;
81 }; 79 };
82 80
83 // Encapsulates an IPC channel between the client and one GPU process. 81 // Encapsulates an IPC channel between the client and one GPU process.
84 // On the GPU process side there's a corresponding GpuChannel. 82 // On the GPU process side there's a corresponding GpuChannel.
85 // Every method can be called on any thread with a message loop, except for the 83 // Every method can be called on any thread with a message loop, except for the
86 // IO thread. 84 // IO thread.
87 class GpuChannelHost : public IPC::Sender, 85 class GpuChannelHost : public IPC::Sender,
88 public base::RefCountedThreadSafe<GpuChannelHost> { 86 public base::RefCountedThreadSafe<GpuChannelHost> {
89 public: 87 public:
90 // Must be called on the main thread (as defined by the factory). 88 // Must be called on the main thread (as defined by the factory).
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Used to look up a proxy from its routing id. 238 // Used to look up a proxy from its routing id.
241 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; 239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap;
242 ProxyMap proxies_; 240 ProxyMap proxies_;
243 241
244 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); 242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
245 }; 243 };
246 244
247 } // namespace content 245 } // namespace content
248 246
249 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ 247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698