| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 scoped_ptr<cc::SoftwareOutputDevice> software, | 50 scoped_ptr<cc::SoftwareOutputDevice> software, |
| 51 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue, | 51 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue, |
| 52 bool use_swap_compositor_frame_message); | 52 bool use_swap_compositor_frame_message); |
| 53 ~CompositorOutputSurface() override; | 53 ~CompositorOutputSurface() override; |
| 54 | 54 |
| 55 // cc::OutputSurface implementation. | 55 // cc::OutputSurface implementation. |
| 56 bool BindToClient(cc::OutputSurfaceClient* client) override; | 56 bool BindToClient(cc::OutputSurfaceClient* client) override; |
| 57 void DetachFromClient() override; | 57 void DetachFromClient() override; |
| 58 void SwapBuffers(cc::CompositorFrame* frame) override; | 58 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 59 | 59 |
| 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) | |
| 62 void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override; | |
| 63 | |
| 64 protected: | 60 protected: |
| 65 void ShortcutSwapAck(uint32_t output_surface_id, | 61 void ShortcutSwapAck(uint32_t output_surface_id, |
| 66 scoped_ptr<cc::GLFrameData> gl_frame_data); | 62 scoped_ptr<cc::GLFrameData> gl_frame_data); |
| 67 virtual void OnSwapAck(uint32_t output_surface_id, | 63 virtual void OnSwapAck(uint32_t output_surface_id, |
| 68 const cc::CompositorFrameAck& ack); | 64 const cc::CompositorFrameAck& ack); |
| 69 virtual void OnReclaimResources(uint32_t output_surface_id, | 65 virtual void OnReclaimResources(uint32_t output_surface_id, |
| 70 const cc::CompositorFrameAck& ack); | 66 const cc::CompositorFrameAck& ack); |
| 71 uint32_t output_surface_id_; | 67 uint32_t output_surface_id_; |
| 72 | 68 |
| 73 private: | 69 private: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 97 bool Send(IPC::Message* message); | 93 bool Send(IPC::Message* message); |
| 98 | 94 |
| 99 bool use_swap_compositor_frame_message_; | 95 bool use_swap_compositor_frame_message_; |
| 100 | 96 |
| 101 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_; | 97 scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_; |
| 102 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_; | 98 CompositorForwardingMessageFilter::Handler output_surface_filter_handler_; |
| 103 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 99 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
| 104 scoped_refptr<IPC::SyncMessageFilter> message_sender_; | 100 scoped_refptr<IPC::SyncMessageFilter> message_sender_; |
| 105 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 101 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 106 int routing_id_; | 102 int routing_id_; |
| 107 #if defined(OS_ANDROID) | |
| 108 bool prefers_smoothness_; | |
| 109 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_; | |
| 110 #endif | |
| 111 | 103 |
| 112 // TODO(danakj): Remove this when crbug.com/311404 | 104 // TODO(danakj): Remove this when crbug.com/311404 |
| 113 bool layout_test_mode_; | 105 bool layout_test_mode_; |
| 114 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; | 106 scoped_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_; |
| 115 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; | 107 base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_; |
| 116 }; | 108 }; |
| 117 | 109 |
| 118 } // namespace content | 110 } // namespace content |
| 119 | 111 |
| 120 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 112 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |