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

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

Issue 1117183006: Remove BrowserGpuChannelHostFactory usage of UnsafeGetMessageLoopForThread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 static void Terminate(); 25 static void Terminate();
26 static BrowserGpuChannelHostFactory* instance() { return instance_; } 26 static BrowserGpuChannelHostFactory* instance() { return instance_; }
27 27
28 static void EnableGpuMemoryBufferFactoryUsage( 28 static void EnableGpuMemoryBufferFactoryUsage(
29 gfx::GpuMemoryBuffer::Usage usage); 29 gfx::GpuMemoryBuffer::Usage usage);
30 static bool IsGpuMemoryBufferFactoryUsageEnabled( 30 static bool IsGpuMemoryBufferFactoryUsageEnabled(
31 gfx::GpuMemoryBuffer::Usage usage); 31 gfx::GpuMemoryBuffer::Usage usage);
32 static uint32 GetImageTextureTarget(); 32 static uint32 GetImageTextureTarget();
33 33
34 // Overridden from GpuChannelHostFactory: 34 // Overridden from GpuChannelHostFactory:
35 bool IsMainThread() override; 35 scoped_refptr<base::SingleThreadTaskRunner> GetMainTaskRunner() override;
36 base::MessageLoop* GetMainLoop() override;
37 scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override; 36 scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() override;
38 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override; 37 scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) override;
39 CreateCommandBufferResult CreateViewCommandBuffer( 38 CreateCommandBufferResult CreateViewCommandBuffer(
40 int32 surface_id, 39 int32 surface_id,
41 const GPUCreateCommandBufferConfig& init_params, 40 const GPUCreateCommandBufferConfig& init_params,
42 int32 route_id) override; 41 int32 route_id) override;
43 42
44 // Overridden from GpuMemoryBufferFactoryHost: 43 // Overridden from GpuMemoryBufferFactoryHost:
45 bool IsGpuMemoryBufferConfigurationSupported( 44 bool IsGpuMemoryBufferConfigurationSupported(
46 gfx::GpuMemoryBuffer::Format format, 45 gfx::GpuMemoryBuffer::Format format,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 CreateCommandBufferResult result); 85 CreateCommandBufferResult result);
87 static void AddFilterOnIO(int gpu_host_id, 86 static void AddFilterOnIO(int gpu_host_id,
88 scoped_refptr<IPC::MessageFilter> filter); 87 scoped_refptr<IPC::MessageFilter> filter);
89 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, 88 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
90 int client_id, 89 int client_id,
91 int32 sync_point); 90 int32 sync_point);
92 void OnGpuMemoryBufferCreated(uint32 request_id, 91 void OnGpuMemoryBufferCreated(uint32 request_id,
93 const gfx::GpuMemoryBufferHandle& handle); 92 const gfx::GpuMemoryBufferHandle& handle);
94 93
95 const int gpu_client_id_; 94 const int gpu_client_id_;
95 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
96 scoped_ptr<base::WaitableEvent> shutdown_event_; 96 scoped_ptr<base::WaitableEvent> shutdown_event_;
97 scoped_refptr<GpuChannelHost> gpu_channel_; 97 scoped_refptr<GpuChannelHost> gpu_channel_;
98 scoped_ptr<BrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_; 98 scoped_ptr<BrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_;
99 int gpu_host_id_; 99 int gpu_host_id_;
100 scoped_refptr<EstablishRequest> pending_request_; 100 scoped_refptr<EstablishRequest> pending_request_;
101 std::vector<base::Closure> established_callbacks_; 101 std::vector<base::Closure> established_callbacks_;
102 uint32 next_create_gpu_memory_buffer_request_id_; 102 uint32 next_create_gpu_memory_buffer_request_id_;
103 typedef std::map<uint32, CreateGpuMemoryBufferCallback> 103 typedef std::map<uint32, CreateGpuMemoryBufferCallback>
104 CreateGpuMemoryBufferCallbackMap; 104 CreateGpuMemoryBufferCallbackMap;
105 CreateGpuMemoryBufferCallbackMap create_gpu_memory_buffer_requests_; 105 CreateGpuMemoryBufferCallbackMap create_gpu_memory_buffer_requests_;
106 106
107 static BrowserGpuChannelHostFactory* instance_; 107 static BrowserGpuChannelHostFactory* instance_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 109 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
110 }; 110 };
111 111
112 } // namespace content 112 } // namespace content
113 113
114 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 114 #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