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

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

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again. Created 8 years, 1 month 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 | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.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_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 21 matching lines...) Expand all
32 int32 surface_id, 32 int32 surface_id,
33 const GPUCreateCommandBufferConfig& init_params) OVERRIDE; 33 const GPUCreateCommandBufferConfig& init_params) OVERRIDE;
34 virtual void CreateImage( 34 virtual void CreateImage(
35 gfx::PluginWindowHandle window, 35 gfx::PluginWindowHandle window,
36 int32 image_id, 36 int32 image_id,
37 const CreateImageCallback& callback) OVERRIDE; 37 const CreateImageCallback& callback) OVERRIDE;
38 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE; 38 virtual void DeleteImage(int32 image_idu, int32 sync_point) OVERRIDE;
39 virtual GpuChannelHost* EstablishGpuChannelSync( 39 virtual GpuChannelHost* EstablishGpuChannelSync(
40 CauseForGpuLaunch cause_for_gpu_launch) OVERRIDE; 40 CauseForGpuLaunch cause_for_gpu_launch) OVERRIDE;
41 41
42 // Specify a task runner and callback to be used for a set of messages.
43 virtual void SetHandlerForControlMessages(
44 const uint32* message_ids,
45 size_t num_messages,
46 const base::Callback<void(const IPC::Message&)>& handler,
47 base::TaskRunner* target_task_runner);
48
42 private: 49 private:
43 struct CreateRequest { 50 struct CreateRequest {
44 CreateRequest(); 51 CreateRequest();
45 ~CreateRequest(); 52 ~CreateRequest();
46 base::WaitableEvent event; 53 base::WaitableEvent event;
47 int gpu_host_id; 54 int gpu_host_id;
48 int32 route_id; 55 int32 route_id;
49 }; 56 };
50 57
51 struct EstablishRequest { 58 struct EstablishRequest {
(...skipping 22 matching lines...) Expand all
74 static void ImageCreatedOnIO( 81 static void ImageCreatedOnIO(
75 const CreateImageCallback& callback, const gfx::Size size); 82 const CreateImageCallback& callback, const gfx::Size size);
76 static void OnImageCreated( 83 static void OnImageCreated(
77 const CreateImageCallback& callback, const gfx::Size size); 84 const CreateImageCallback& callback, const gfx::Size size);
78 void DeleteImageOnIO(int32 image_id, int32 sync_point); 85 void DeleteImageOnIO(int32 image_id, int32 sync_point);
79 void EstablishGpuChannelOnIO(EstablishRequest* request); 86 void EstablishGpuChannelOnIO(EstablishRequest* request);
80 void GpuChannelEstablishedOnIO( 87 void GpuChannelEstablishedOnIO(
81 EstablishRequest* request, 88 EstablishRequest* request,
82 const IPC::ChannelHandle& channel_handle, 89 const IPC::ChannelHandle& channel_handle,
83 const GPUInfo& gpu_info); 90 const GPUInfo& gpu_info);
91 static void AddFilterOnIO(
92 int gpu_host_id,
93 scoped_refptr<IPC::ChannelProxy::MessageFilter> filter);
84 94
85 int gpu_client_id_; 95 int gpu_client_id_;
86 scoped_ptr<base::WaitableEvent> shutdown_event_; 96 scoped_ptr<base::WaitableEvent> shutdown_event_;
87 scoped_refptr<GpuChannelHost> gpu_channel_; 97 scoped_refptr<GpuChannelHost> gpu_channel_;
88 int gpu_host_id_; 98 int gpu_host_id_;
89 99
90 static BrowserGpuChannelHostFactory* instance_; 100 static BrowserGpuChannelHostFactory* instance_;
91 101
92 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 102 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
93 }; 103 };
94 104
95 } // namespace content 105 } // namespace content
96 106
97 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 107 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698