OLD | NEW |
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_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
Surface.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSoftwa
reOutputDevice.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSoftwa
reOutputDevice.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 class TaskRunner; | 18 class TaskRunner; |
19 } | 19 } |
20 | 20 |
21 namespace IPC { | 21 namespace IPC { |
22 class ForwardingMessageFilter; | 22 class ForwardingMessageFilter; |
23 class Message; | 23 class Message; |
24 class SyncChannel; | |
25 } | 24 } |
26 | 25 |
| 26 namespace content { |
| 27 |
27 // This class can be created only on the main thread, but then becomes pinned | 28 // This class can be created only on the main thread, but then becomes pinned |
28 // to a fixed thread when bindToClient is called. | 29 // to a fixed thread when bindToClient is called. |
29 class CompositorOutputSurface | 30 class CompositorOutputSurface |
30 : NON_EXPORTED_BASE(public WebKit::WebCompositorOutputSurface) | 31 : NON_EXPORTED_BASE(public WebKit::WebCompositorOutputSurface), |
31 , NON_EXPORTED_BASE(public base::NonThreadSafe) { | 32 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
32 public: | 33 public: |
33 static IPC::ForwardingMessageFilter* CreateFilter( | 34 static IPC::ForwardingMessageFilter* CreateFilter( |
34 base::TaskRunner* target_task_runner); | 35 base::TaskRunner* target_task_runner); |
35 | 36 |
36 CompositorOutputSurface(int32 routing_id, | 37 CompositorOutputSurface(int32 routing_id, |
37 WebKit::WebGraphicsContext3D* context3d, | 38 WebKit::WebGraphicsContext3D* context3d, |
38 WebKit::WebCompositorSoftwareOutputDevice* software); | 39 WebKit::WebCompositorSoftwareOutputDevice* software); |
39 virtual ~CompositorOutputSurface(); | 40 virtual ~CompositorOutputSurface(); |
40 | 41 |
41 // WebCompositorOutputSurface implementation. | 42 // WebCompositorOutputSurface implementation. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 75 |
75 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | 76 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; |
76 WebKit::WebCompositorOutputSurfaceClient* client_; | 77 WebKit::WebCompositorOutputSurfaceClient* client_; |
77 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 78 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
78 int routing_id_; | 79 int routing_id_; |
79 Capabilities capabilities_; | 80 Capabilities capabilities_; |
80 scoped_ptr<WebKit::WebGraphicsContext3D> context3D_; | 81 scoped_ptr<WebKit::WebGraphicsContext3D> context3D_; |
81 scoped_ptr<WebKit::WebCompositorSoftwareOutputDevice> software_device_; | 82 scoped_ptr<WebKit::WebCompositorSoftwareOutputDevice> software_device_; |
82 }; | 83 }; |
83 | 84 |
| 85 } // namespace content |
| 86 |
84 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 87 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |