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 26 matching lines...) Expand all Loading... | |
37 // to a fixed thread when bindToClient is called. | 37 // to a fixed thread when bindToClient is called. |
38 class CompositorOutputSurface | 38 class CompositorOutputSurface |
39 : NON_EXPORTED_BASE(public cc::OutputSurface), | 39 : NON_EXPORTED_BASE(public cc::OutputSurface), |
40 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 40 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
41 public: | 41 public: |
42 static IPC::ForwardingMessageFilter* CreateFilter( | 42 static IPC::ForwardingMessageFilter* CreateFilter( |
43 base::TaskRunner* target_task_runner); | 43 base::TaskRunner* target_task_runner); |
44 | 44 |
45 CompositorOutputSurface(int32 routing_id, | 45 CompositorOutputSurface(int32 routing_id, |
46 WebGraphicsContext3DCommandBufferImpl* context3d, | 46 WebGraphicsContext3DCommandBufferImpl* context3d, |
47 cc::SoftwareOutputDevice* software); | 47 cc::SoftwareOutputDevice* software, |
48 bool swap_buffers_via_ipc); | |
48 virtual ~CompositorOutputSurface(); | 49 virtual ~CompositorOutputSurface(); |
49 | 50 |
50 // cc::OutputSurface implementation. | 51 // cc::OutputSurface implementation. |
51 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; | 52 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; |
52 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; | 53 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
53 virtual void PostSubBuffer(gfx::Rect rect, const ui::LatencyInfo&) OVERRIDE; | |
54 virtual void SwapBuffers(const ui::LatencyInfo&) OVERRIDE; | |
55 #if defined(OS_ANDROID) | 54 #if defined(OS_ANDROID) |
56 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; | 55 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
57 #endif | 56 #endif |
58 | 57 |
59 // TODO(epenner): This seems out of place here and would be a better fit | 58 // TODO(epenner): This seems out of place here and would be a better fit |
60 // int CompositorThread after it is fully refactored (http://crbug/170828) | 59 // int CompositorThread after it is fully refactored (http://crbug/170828) |
61 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; | 60 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; |
62 | 61 |
63 protected: | 62 protected: |
64 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); | 63 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); |
(...skipping 20 matching lines...) Expand all Loading... | |
85 }; | 84 }; |
86 | 85 |
87 void OnMessageReceived(const IPC::Message& message); | 86 void OnMessageReceived(const IPC::Message& message); |
88 void OnUpdateVSyncParameters( | 87 void OnUpdateVSyncParameters( |
89 base::TimeTicks timebase, base::TimeDelta interval); | 88 base::TimeTicks timebase, base::TimeDelta interval); |
90 #if defined(OS_ANDROID) | 89 #if defined(OS_ANDROID) |
91 void OnBeginFrame(base::TimeTicks frame_time); | 90 void OnBeginFrame(base::TimeTicks frame_time); |
92 #endif | 91 #endif |
93 bool Send(IPC::Message* message); | 92 bool Send(IPC::Message* message); |
94 | 93 |
94 bool swap_buffers_via_ipc_; | |
piman
2013/06/10 19:52:25
nit: naming was confusing to me at first, because
aelias_OOO_until_Jul13
2013/06/10 23:18:07
Renamed.
| |
95 | |
95 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | 96 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; |
96 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 97 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
97 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 98 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
98 int routing_id_; | 99 int routing_id_; |
99 bool prefers_smoothness_; | 100 bool prefers_smoothness_; |
100 base::PlatformThreadHandle main_thread_handle_; | 101 base::PlatformThreadHandle main_thread_handle_; |
101 }; | 102 }; |
102 | 103 |
103 } // namespace content | 104 } // namespace content |
104 | 105 |
105 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 106 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |