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

Side by Side Diff: content/browser/gpu/gpu_process_host.h

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 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 | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/gpu/gpu_process_host.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_BROWSER_GPU_GPU_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/hash_tables.h" 14 #include "base/hash_tables.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "content/browser/gpu/gpu_surface_tracker.h" 18 #include "content/browser/gpu/gpu_surface_tracker.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/gpu/gpu_memory_uma_stats.h" 20 #include "content/common/gpu/gpu_memory_uma_stats.h"
21 #include "content/common/gpu/gpu_process_launch_causes.h" 21 #include "content/common/gpu/gpu_process_launch_causes.h"
22 #include "content/public/browser/browser_child_process_host_delegate.h" 22 #include "content/public/browser/browser_child_process_host_delegate.h"
23 #include "content/public/browser/gpu_data_manager.h" 23 #include "content/public/browser/gpu_data_manager.h"
24 #include "content/public/common/gpu_info.h"
25 #include "googleurl/src/gurl.h" 24 #include "googleurl/src/gurl.h"
26 #include "gpu/command_buffer/common/constants.h" 25 #include "gpu/command_buffer/common/constants.h"
26 #include "gpu/config/gpu_info.h"
27 #include "ipc/ipc_channel_proxy.h" 27 #include "ipc/ipc_channel_proxy.h"
28 #include "ipc/ipc_sender.h" 28 #include "ipc/ipc_sender.h"
29 #include "ui/gfx/native_widget_types.h" 29 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/size.h" 30 #include "ui/gfx/size.h"
31 31
32 struct GPUCreateCommandBufferConfig; 32 struct GPUCreateCommandBufferConfig;
33 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; 33 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
34 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params; 34 struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
35 struct GpuHostMsg_AcceleratedSurfaceRelease_Params; 35 struct GpuHostMsg_AcceleratedSurfaceRelease_Params;
36 36
(...skipping 10 matching lines...) Expand all
47 class GpuProcessHost : public BrowserChildProcessHostDelegate, 47 class GpuProcessHost : public BrowserChildProcessHostDelegate,
48 public IPC::Sender, 48 public IPC::Sender,
49 public base::NonThreadSafe { 49 public base::NonThreadSafe {
50 public: 50 public:
51 enum GpuProcessKind { 51 enum GpuProcessKind {
52 GPU_PROCESS_KIND_UNSANDBOXED, 52 GPU_PROCESS_KIND_UNSANDBOXED,
53 GPU_PROCESS_KIND_SANDBOXED, 53 GPU_PROCESS_KIND_SANDBOXED,
54 GPU_PROCESS_KIND_COUNT 54 GPU_PROCESS_KIND_COUNT
55 }; 55 };
56 56
57 typedef base::Callback<void(const IPC::ChannelHandle&, const GPUInfo&)> 57 typedef base::Callback<void(const IPC::ChannelHandle&, const gpu::GPUInfo&)>
58 EstablishChannelCallback; 58 EstablishChannelCallback;
59 59
60 typedef base::Callback<void(int32)> CreateCommandBufferCallback; 60 typedef base::Callback<void(int32)> CreateCommandBufferCallback;
61 61
62 typedef base::Callback<void(const gfx::Size)> CreateImageCallback; 62 typedef base::Callback<void(const gfx::Size)> CreateImageCallback;
63 63
64 static bool gpu_enabled() { return gpu_enabled_; } 64 static bool gpu_enabled() { return gpu_enabled_; }
65 65
66 // Creates a new GpuProcessHost or gets an existing one, resulting in the 66 // Creates a new GpuProcessHost or gets an existing one, resulting in the
67 // launching of a GPU process if required. Returns null on failure. It 67 // launching of a GPU process if required. Returns null on failure. It
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> > 264 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> >
265 SurfaceRefMap; 265 SurfaceRefMap;
266 SurfaceRefMap surface_refs_; 266 SurfaceRefMap surface_refs_;
267 267
268 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 268 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
269 }; 269 };
270 270
271 } // namespace content 271 } // namespace content
272 272
273 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 273 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698