OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_GPU_GPU_THREAD_H_ | 5 #ifndef CHROME_GPU_GPU_THREAD_H_ |
6 #define CHROME_GPU_GPU_THREAD_H_ | 6 #define CHROME_GPU_GPU_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 private: | 44 private: |
45 // ChildThread overrides. | 45 // ChildThread overrides. |
46 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 46 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
47 | 47 |
48 // Message handlers. | 48 // Message handlers. |
49 void OnInitialize(); | 49 void OnInitialize(); |
50 void OnEstablishChannel(int renderer_id); | 50 void OnEstablishChannel(int renderer_id); |
51 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); | 51 void OnCloseChannel(const IPC::ChannelHandle& channel_handle); |
52 void OnSynchronize(); | 52 void OnSynchronize(); |
53 void OnCollectGraphicsInfo(); | 53 void OnCollectGraphicsInfo(); |
| 54 void OnCreateViewCommandBuffer( |
| 55 gfx::PluginWindowHandle window, |
| 56 int32 render_view_id, |
| 57 int32 renderer_id, |
| 58 const GPUCreateCommandBufferConfig& init_params); |
54 #if defined(OS_MACOSX) | 59 #if defined(OS_MACOSX) |
55 void OnAcceleratedSurfaceBuffersSwappedACK( | 60 void OnAcceleratedSurfaceBuffersSwappedACK( |
56 int renderer_id, int32 route_id, uint64 swap_buffers_count); | 61 int renderer_id, int32 route_id, uint64 swap_buffers_count); |
57 void OnDidDestroyAcceleratedSurface(int renderer_id, int32 renderer_route_id); | 62 void OnDidDestroyAcceleratedSurface(int renderer_id, int32 renderer_route_id); |
58 #endif | 63 #endif |
59 void OnCrash(); | 64 void OnCrash(); |
60 void OnHang(); | 65 void OnHang(); |
61 | 66 |
62 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
63 static void CollectDxDiagnostics(GpuThread* thread); | 68 static void CollectDxDiagnostics(GpuThread* thread); |
64 static void SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node); | 69 static void SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node); |
65 #endif | 70 #endif |
66 | 71 |
67 base::Time process_start_time_; | 72 base::Time process_start_time_; |
68 scoped_refptr<GpuWatchdogThread> watchdog_thread_; | 73 scoped_refptr<GpuWatchdogThread> watchdog_thread_; |
69 | 74 |
70 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 75 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
71 GpuChannelMap gpu_channels_; | 76 GpuChannelMap gpu_channels_; |
72 | 77 |
73 // Information about the GPU, such as device and vendor ID. | 78 // Information about the GPU, such as device and vendor ID. |
74 GPUInfo gpu_info_; | 79 GPUInfo gpu_info_; |
75 | 80 |
76 DISALLOW_COPY_AND_ASSIGN(GpuThread); | 81 DISALLOW_COPY_AND_ASSIGN(GpuThread); |
77 }; | 82 }; |
78 | 83 |
79 #endif // CHROME_GPU_GPU_THREAD_H_ | 84 #endif // CHROME_GPU_GPU_THREAD_H_ |
OLD | NEW |