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

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

Issue 205193006: gpu: Remove map_image field from gpu::Capabilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move TODO Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('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>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "gpu/command_buffer/common/capabilities.h"
18 #include "gpu/command_buffer/common/command_buffer.h" 19 #include "gpu/command_buffer/common/command_buffer.h"
19 #include "gpu/command_buffer/common/command_buffer_shared.h" 20 #include "gpu/command_buffer/common/command_buffer_shared.h"
20 #include "gpu/command_buffer/common/gpu_control.h" 21 #include "gpu/command_buffer/common/gpu_control.h"
21 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 22 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
22 #include "ipc/ipc_listener.h" 23 #include "ipc/ipc_listener.h"
23 #include "media/video/video_decode_accelerator.h" 24 #include "media/video/video_decode_accelerator.h"
24 #include "ui/events/latency_info.h" 25 #include "ui/events/latency_info.h"
25 26
26 struct GPUCommandBufferConsoleMessage; 27 struct GPUCommandBufferConsoleMessage;
27 28
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 virtual gpu::Buffer CreateTransferBuffer(size_t size, 90 virtual gpu::Buffer CreateTransferBuffer(size_t size,
90 int32* id) OVERRIDE; 91 int32* id) OVERRIDE;
91 virtual void DestroyTransferBuffer(int32 id) OVERRIDE; 92 virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
92 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE; 93 virtual gpu::Buffer GetTransferBuffer(int32 id) OVERRIDE;
93 virtual void SetToken(int32 token) OVERRIDE; 94 virtual void SetToken(int32 token) OVERRIDE;
94 virtual void SetParseError(gpu::error::Error error) OVERRIDE; 95 virtual void SetParseError(gpu::error::Error error) OVERRIDE;
95 virtual void SetContextLostReason( 96 virtual void SetContextLostReason(
96 gpu::error::ContextLostReason reason) OVERRIDE; 97 gpu::error::ContextLostReason reason) OVERRIDE;
97 98
98 // gpu::GpuControl implementation: 99 // gpu::GpuControl implementation:
99 virtual gpu::Capabilities GetCapabilities() OVERRIDE;
100 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( 100 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
101 size_t width, 101 size_t width,
102 size_t height, 102 size_t height,
103 unsigned internalformat, 103 unsigned internalformat,
104 int32* id) OVERRIDE; 104 int32* id) OVERRIDE;
105 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE; 105 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
106 virtual uint32 InsertSyncPoint() OVERRIDE; 106 virtual uint32 InsertSyncPoint() OVERRIDE;
107 virtual void SignalSyncPoint(uint32 sync_point, 107 virtual void SignalSyncPoint(uint32 sync_point,
108 const base::Closure& callback) OVERRIDE; 108 const base::Closure& callback) OVERRIDE;
109 virtual void SignalQuery(uint32 query, 109 virtual void SignalQuery(uint32 query,
(...skipping 23 matching lines...) Expand all
133 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); 133 void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
134 134
135 // TODO(apatrick): this is a temporary optimization while skia is calling 135 // TODO(apatrick): this is a temporary optimization while skia is calling
136 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 136 // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6
137 // ints redundantly when only the error is needed for the 137 // ints redundantly when only the error is needed for the
138 // CommandBufferProxyImpl implementation. 138 // CommandBufferProxyImpl implementation.
139 virtual gpu::error::Error GetLastError() OVERRIDE; 139 virtual gpu::error::Error GetLastError() OVERRIDE;
140 140
141 GpuChannelHost* channel() const { return channel_; } 141 GpuChannelHost* channel() const { return channel_; }
142 142
143 const gpu::Capabilities& capabilities() const { return capabilities_; }
144
143 private: 145 private:
144 typedef std::map<int32, gpu::Buffer> TransferBufferMap; 146 typedef std::map<int32, gpu::Buffer> TransferBufferMap;
145 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; 147 typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
146 typedef std::map<int32, gfx::GpuMemoryBuffer*> GpuMemoryBufferMap; 148 typedef std::map<int32, gfx::GpuMemoryBuffer*> GpuMemoryBufferMap;
147 149
148 // Send an IPC message over the GPU channel. This is private to fully 150 // Send an IPC message over the GPU channel. This is private to fully
149 // encapsulate the channel; all callers of this function must explicitly 151 // encapsulate the channel; all callers of this function must explicitly
150 // verify that the context has not been lost. 152 // verify that the context has not been lost.
151 bool Send(IPC::Message* msg); 153 bool Send(IPC::Message* msg);
152 154
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GpuMemoryBufferMap gpu_memory_buffers_; 205 GpuMemoryBufferMap gpu_memory_buffers_;
204 206
205 gpu::Capabilities capabilities_; 207 gpu::Capabilities capabilities_;
206 208
207 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 209 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
208 }; 210 };
209 211
210 } // namespace content 212 } // namespace content
211 213
212 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 214 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698