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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 uint32 output_surface_id, | 50 uint32 output_surface_id, |
51 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, | 51 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
52 scoped_ptr<cc::SoftwareOutputDevice> software, | 52 scoped_ptr<cc::SoftwareOutputDevice> software, |
53 bool use_swap_compositor_frame_message); | 53 bool use_swap_compositor_frame_message); |
54 virtual ~CompositorOutputSurface(); | 54 virtual ~CompositorOutputSurface(); |
55 | 55 |
56 // cc::OutputSurface implementation. | 56 // cc::OutputSurface implementation. |
57 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; | 57 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; |
58 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; | 58 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
59 #if defined(OS_ANDROID) | 59 #if defined(OS_ANDROID) |
60 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; | 60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; |
61 #endif | 61 #endif |
62 | 62 |
63 // TODO(epenner): This seems out of place here and would be a better fit | 63 // TODO(epenner): This seems out of place here and would be a better fit |
64 // int CompositorThread after it is fully refactored (http://crbug/170828) | 64 // int CompositorThread after it is fully refactored (http://crbug/170828) |
65 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; | 65 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; |
66 | 66 |
67 protected: | 67 protected: |
68 void ShortcutSwapAck(uint32 output_surface_id, | 68 void ShortcutSwapAck(uint32 output_surface_id, |
69 scoped_ptr<cc::GLFrameData> gl_frame_data, | 69 scoped_ptr<cc::GLFrameData> gl_frame_data, |
70 scoped_ptr<cc::SoftwareFrameData> software_frame_data); | 70 scoped_ptr<cc::SoftwareFrameData> software_frame_data); |
(...skipping 21 matching lines...) Expand all Loading... |
92 ~CompositorOutputSurfaceProxy() {} | 92 ~CompositorOutputSurfaceProxy() {} |
93 CompositorOutputSurface* output_surface_; | 93 CompositorOutputSurface* output_surface_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); | 95 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); |
96 }; | 96 }; |
97 | 97 |
98 void OnMessageReceived(const IPC::Message& message); | 98 void OnMessageReceived(const IPC::Message& message); |
99 void OnUpdateVSyncParametersFromBrowser(base::TimeTicks timebase, | 99 void OnUpdateVSyncParametersFromBrowser(base::TimeTicks timebase, |
100 base::TimeDelta interval); | 100 base::TimeDelta interval); |
101 #if defined(OS_ANDROID) | 101 #if defined(OS_ANDROID) |
102 void OnBeginImplFrame(const cc::BeginFrameArgs& args); | 102 void OnBeginFrame(const cc::BeginFrameArgs& args); |
103 #endif | 103 #endif |
104 bool Send(IPC::Message* message); | 104 bool Send(IPC::Message* message); |
105 | 105 |
106 bool use_swap_compositor_frame_message_; | 106 bool use_swap_compositor_frame_message_; |
107 | 107 |
108 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | 108 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; |
109 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 109 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
110 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 110 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
111 int routing_id_; | 111 int routing_id_; |
112 bool prefers_smoothness_; | 112 bool prefers_smoothness_; |
113 base::PlatformThreadHandle main_thread_handle_; | 113 base::PlatformThreadHandle main_thread_handle_; |
114 | 114 |
115 // TODO(danakj): Remove this when crbug.com/311404 | 115 // TODO(danakj): Remove this when crbug.com/311404 |
116 bool layout_test_mode_; | 116 bool layout_test_mode_; |
117 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; | 117 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; |
118 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; | 118 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; |
119 }; | 119 }; |
120 | 120 |
121 } // namespace content | 121 } // namespace content |
122 | 122 |
123 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 123 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |