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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetNeedsBeginImplFrame(bool enable) OVERRIDE; | 57 virtual void SetNeedsBeginImplFrame(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 |
61 // int CompositorThread after it is fully refactored (http://crbug/170828) | 61 // int CompositorThread after it is fully refactored (http://crbug/170828) |
62 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; | 62 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; |
63 | 63 |
64 protected: | 64 protected: |
| 65 void ShortcutSwapAck(int output_surface_id, |
| 66 scoped_ptr<cc::CompositorFrameAck> ack); |
65 virtual void OnSwapAck(uint32 output_surface_id, | 67 virtual void OnSwapAck(uint32 output_surface_id, |
66 const cc::CompositorFrameAck& ack); | 68 const cc::CompositorFrameAck& ack); |
67 virtual void OnReclaimResources(uint32 output_surface_id, | 69 virtual void OnReclaimResources(uint32 output_surface_id, |
68 const cc::CompositorFrameAck& ack); | 70 const cc::CompositorFrameAck& ack); |
69 uint32 output_surface_id_; | 71 uint32 output_surface_id_; |
70 | 72 |
71 private: | 73 private: |
72 class CompositorOutputSurfaceProxy : | 74 class CompositorOutputSurfaceProxy : |
73 public base::RefCountedThreadSafe<CompositorOutputSurfaceProxy> { | 75 public base::RefCountedThreadSafe<CompositorOutputSurfaceProxy> { |
74 public: | 76 public: |
(...skipping 22 matching lines...) Expand all Loading... |
97 #endif | 99 #endif |
98 bool Send(IPC::Message* message); | 100 bool Send(IPC::Message* message); |
99 | 101 |
100 bool use_swap_compositor_frame_message_; | 102 bool use_swap_compositor_frame_message_; |
101 | 103 |
102 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | 104 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; |
103 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 105 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
104 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 106 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
105 int routing_id_; | 107 int routing_id_; |
106 bool prefers_smoothness_; | 108 bool prefers_smoothness_; |
| 109 // TODO(danakj): Remove this when crbug.com/311404 |
| 110 bool layout_test_mode_; |
107 base::PlatformThreadHandle main_thread_handle_; | 111 base::PlatformThreadHandle main_thread_handle_; |
108 }; | 112 }; |
109 | 113 |
110 } // namespace content | 114 } // namespace content |
111 | 115 |
112 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 116 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |