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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class ForwardingMessageFilter; | 24 class ForwardingMessageFilter; |
25 class Message; | 25 class Message; |
26 } | 26 } |
27 | 27 |
28 namespace cc { | 28 namespace cc { |
29 class CompositorFrame; | 29 class CompositorFrame; |
30 class CompositorFrameAck; | 30 class CompositorFrameAck; |
31 } | 31 } |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 | 34 class ContextProviderCommandBuffer; |
35 class WebGraphicsContext3DCommandBufferImpl; | |
36 | 35 |
37 // This class can be created only on the main thread, but then becomes pinned | 36 // This class can be created only on the main thread, but then becomes pinned |
38 // to a fixed thread when bindToClient is called. | 37 // to a fixed thread when bindToClient is called. |
39 class CompositorOutputSurface | 38 class CompositorOutputSurface |
40 : NON_EXPORTED_BASE(public cc::OutputSurface), | 39 : NON_EXPORTED_BASE(public cc::OutputSurface), |
41 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 40 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
42 public: | 41 public: |
43 static IPC::ForwardingMessageFilter* CreateFilter( | 42 static IPC::ForwardingMessageFilter* CreateFilter( |
44 base::TaskRunner* target_task_runner); | 43 base::TaskRunner* target_task_runner); |
45 | 44 |
46 CompositorOutputSurface(int32 routing_id, | 45 CompositorOutputSurface( |
47 uint32 output_surface_id, | 46 int32 routing_id, |
48 WebGraphicsContext3DCommandBufferImpl* context3d, | 47 uint32 output_surface_id, |
49 cc::SoftwareOutputDevice* software, | 48 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
50 bool use_swap_compositor_frame_message); | 49 scoped_ptr<cc::SoftwareOutputDevice> software, |
| 50 bool use_swap_compositor_frame_message); |
51 virtual ~CompositorOutputSurface(); | 51 virtual ~CompositorOutputSurface(); |
52 | 52 |
53 // cc::OutputSurface implementation. | 53 // cc::OutputSurface implementation. |
54 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; | 54 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; |
55 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 55 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
56 #if defined(OS_ANDROID) | 56 #if defined(OS_ANDROID) |
57 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 57 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
58 #endif | 58 #endif |
59 | 59 |
60 // TODO(epenner): This seems out of place here and would be a better fit | 60 // TODO(epenner): This seems out of place here and would be a better fit |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 101 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
102 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 102 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
103 int routing_id_; | 103 int routing_id_; |
104 bool prefers_smoothness_; | 104 bool prefers_smoothness_; |
105 base::PlatformThreadHandle main_thread_handle_; | 105 base::PlatformThreadHandle main_thread_handle_; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace content | 108 } // namespace content |
109 | 109 |
110 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 110 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |