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