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

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

Issue 547733002: [Pepper GL] Use shared state to fix a memory leak in MapSub GL extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remve base/memory/shared_memory.h from DEPS 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
« no previous file with comments | « no previous file | content/renderer/pepper/ppb_graphics_3d_impl.h » ('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 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); 134 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
135 135
136 // TODO(apatrick): this is a temporary optimization while skia is calling 136 // TODO(apatrick): this is a temporary optimization while skia is calling
137 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 137 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6
138 // ints redundantly when only the error is needed for the 138 // ints redundantly when only the error is needed for the
139 // CommandBufferProxyImpl implementation. 139 // CommandBufferProxyImpl implementation.
140 virtual gpu::error::Error GetLastError() OVERRIDE; 140 virtual gpu::error::Error GetLastError() OVERRIDE;
141 141
142 GpuChannelHost* channel() const { return channel_; } 142 GpuChannelHost* channel() const { return channel_; }
143 143
144 base::SharedMemoryHandle GetSharedStateHandle() const {
145 return shared_state_shm_->handle();
146 }
147
144 private: 148 private:
145 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; 149 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap;
146 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; 150 typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
147 typedef base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer> 151 typedef base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer>
148 GpuMemoryBufferMap; 152 GpuMemoryBufferMap;
149 153
150 // Send an IPC message over the GPU channel. This is private to fully 154 // Send an IPC message over the GPU channel. This is private to fully
151 // encapsulate the channel; all callers of this function must explicitly 155 // encapsulate the channel; all callers of this function must explicitly
152 // verify that the context has not been lost. 156 // verify that the context has not been lost.
153 bool Send(IPC::Message* msg); 157 bool Send(IPC::Message* msg);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 GpuMemoryBufferMap gpu_memory_buffers_; 203 GpuMemoryBufferMap gpu_memory_buffers_;
200 204
201 gpu::Capabilities capabilities_; 205 gpu::Capabilities capabilities_;
202 206
203 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 207 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
204 }; 208 };
205 209
206 } // namespace content 210 } // namespace content
207 211
208 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 212 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698