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

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

Issue 338193003: ozone: gpu: Add plumbing for platform-specific gpu messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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/atomic_sequence_num.h"
13 #include "base/callback.h" 14 #include "base/callback.h"
14 #include "base/containers/hash_tables.h" 15 #include "base/containers/hash_tables.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 17 #include "base/threading/non_thread_safe.h"
17 #include "base/time/time.h" 18 #include "base/time/time.h"
18 #include "content/browser/gpu/gpu_surface_tracker.h" 19 #include "content/browser/gpu/gpu_surface_tracker.h"
19 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
20 #include "content/common/gpu/gpu_memory_uma_stats.h" 21 #include "content/common/gpu/gpu_memory_uma_stats.h"
21 #include "content/common/gpu/gpu_process_launch_causes.h" 22 #include "content/common/gpu/gpu_process_launch_causes.h"
22 #include "content/public/browser/browser_child_process_host_delegate.h" 23 #include "content/public/browser/browser_child_process_host_delegate.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 GpuProcessKind kind(); 145 GpuProcessKind kind();
145 146
146 void ForceShutdown(); 147 void ForceShutdown();
147 148
148 void BeginFrameSubscription( 149 void BeginFrameSubscription(
149 int surface_id, 150 int surface_id,
150 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber); 151 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber);
151 void EndFrameSubscription(int surface_id); 152 void EndFrameSubscription(int surface_id);
152 void LoadedShader(const std::string& key, const std::string& data); 153 void LoadedShader(const std::string& key, const std::string& data);
153 154
155 int32 GenerateRouteID();
rjkroege 2014/06/16 21:38:49 does this need to be public? I missed seeing it be
156
154 private: 157 private:
155 static bool ValidateHost(GpuProcessHost* host); 158 static bool ValidateHost(GpuProcessHost* host);
156 159
157 GpuProcessHost(int host_id, GpuProcessKind kind); 160 GpuProcessHost(int host_id, GpuProcessKind kind);
158 virtual ~GpuProcessHost(); 161 virtual ~GpuProcessHost();
159 162
160 bool Init(); 163 bool Init();
161 164
162 // Post an IPC message to the UI shim's message handler on the UI thread. 165 // Post an IPC message to the UI shim's message handler on the UI thread.
163 void RouteOnUIThread(const IPC::Message& message); 166 void RouteOnUIThread(const IPC::Message& message);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 275
273 std::string shader_prefix_key_; 276 std::string shader_prefix_key_;
274 277
275 // Keep an extra reference to the SurfaceRef stored in the GpuSurfaceTracker 278 // Keep an extra reference to the SurfaceRef stored in the GpuSurfaceTracker
276 // in this map so that we don't destroy it whilst the GPU process is 279 // in this map so that we don't destroy it whilst the GPU process is
277 // drawing to it. 280 // drawing to it.
278 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> > 281 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> >
279 SurfaceRefMap; 282 SurfaceRefMap;
280 SurfaceRefMap surface_refs_; 283 SurfaceRefMap surface_refs_;
281 284
285 base::AtomicSequenceNumber next_route_id_;
286
282 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 287 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
283 }; 288 };
284 289
285 } // namespace content 290 } // namespace content
286 291
287 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 292 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698