| 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 28 matching lines...) Expand all Loading... |
| 39 base::TaskRunner* target_task_runner); | 39 base::TaskRunner* target_task_runner); |
| 40 | 40 |
| 41 CompositorOutputSurface(int32 routing_id, | 41 CompositorOutputSurface(int32 routing_id, |
| 42 WebKit::WebGraphicsContext3D* context3d, | 42 WebKit::WebGraphicsContext3D* context3d, |
| 43 cc::SoftwareOutputDevice* software); | 43 cc::SoftwareOutputDevice* software); |
| 44 virtual ~CompositorOutputSurface(); | 44 virtual ~CompositorOutputSurface(); |
| 45 | 45 |
| 46 // cc::OutputSurface implementation. | 46 // cc::OutputSurface implementation. |
| 47 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; | 47 virtual bool BindToClient(cc::OutputSurfaceClient* client) OVERRIDE; |
| 48 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; | 48 virtual void SendFrameToParentCompositor(cc::CompositorFrame*) OVERRIDE; |
| 49 virtual void EnableVSyncNotification(bool enable) OVERRIDE; |
| 49 | 50 |
| 50 // TODO(epenner): This seems out of place here and would be a better fit | 51 // TODO(epenner): This seems out of place here and would be a better fit |
| 51 // int CompositorThread after it is fully refactored (http://crbug/170828) | 52 // int CompositorThread after it is fully refactored (http://crbug/170828) |
| 52 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; | 53 virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) OVERRIDE; |
| 53 | 54 |
| 54 protected: | 55 protected: |
| 55 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); | 56 virtual void OnSwapAck(const cc::CompositorFrameAck& ack); |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 class CompositorOutputSurfaceProxy : | 59 class CompositorOutputSurfaceProxy : |
| (...skipping 12 matching lines...) Expand all Loading... |
| 71 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>; | 72 friend class base::RefCountedThreadSafe<CompositorOutputSurfaceProxy>; |
| 72 ~CompositorOutputSurfaceProxy() {} | 73 ~CompositorOutputSurfaceProxy() {} |
| 73 CompositorOutputSurface* output_surface_; | 74 CompositorOutputSurface* output_surface_; |
| 74 | 75 |
| 75 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); | 76 DISALLOW_COPY_AND_ASSIGN(CompositorOutputSurfaceProxy); |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 void OnMessageReceived(const IPC::Message& message); | 79 void OnMessageReceived(const IPC::Message& message); |
| 79 void OnUpdateVSyncParameters( | 80 void OnUpdateVSyncParameters( |
| 80 base::TimeTicks timebase, base::TimeDelta interval); | 81 base::TimeTicks timebase, base::TimeDelta interval); |
| 82 void DidVSync(base::TimeTicks frame_time); |
| 81 bool Send(IPC::Message* message); | 83 bool Send(IPC::Message* message); |
| 82 | 84 |
| 83 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; | 85 scoped_refptr<IPC::ForwardingMessageFilter> output_surface_filter_; |
| 84 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; | 86 scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_; |
| 85 int routing_id_; | 87 int routing_id_; |
| 86 bool prefers_smoothness_; | 88 bool prefers_smoothness_; |
| 87 base::PlatformThreadId main_thread_id_; | 89 base::PlatformThreadId main_thread_id_; |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace content | 92 } // namespace content |
| 91 | 93 |
| 92 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ | 94 #endif // CONTENT_RENDERER_GPU_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |