| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ | 5 #ifndef CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ |
| 6 #define CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ | 6 #define CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ |
| 7 | 7 |
| 8 #include "cc/surfaces/display_client.h" | 8 #include "cc/surfaces/display_client.h" |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 Display* display() { return display_.get(); } | 43 Display* display() { return display_.get(); } |
| 44 void set_surface_output_surface(SurfaceDisplayOutputSurface* surface) { | 44 void set_surface_output_surface(SurfaceDisplayOutputSurface* surface) { |
| 45 surface_display_output_surface_ = surface; | 45 surface_display_output_surface_ = surface; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // DisplayClient implementation. | 48 // DisplayClient implementation. |
| 49 void CommitVSyncParameters(base::TimeTicks timebase, | 49 void CommitVSyncParameters(base::TimeTicks timebase, |
| 50 base::TimeDelta interval) override; | 50 base::TimeDelta interval) override; |
| 51 void OutputSurfaceLost() override; | 51 void OutputSurfaceLost() override; |
| 52 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 52 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 53 BeginFrameSource* BeginFrameSourceForChildren() override; |
| 53 | 54 |
| 54 bool output_surface_lost() { return output_surface_lost_; } | 55 bool output_surface_lost() { return output_surface_lost_; } |
| 55 | 56 |
| 56 protected: | 57 protected: |
| 57 scoped_ptr<OutputSurface> output_surface_; | 58 scoped_ptr<OutputSurface> output_surface_; |
| 58 // Be careful of destruction order: | 59 // Be careful of destruction order: |
| 59 // Display depends on DisplayScheduler depends on *BeginFrameSource | 60 // Display depends on DisplayScheduler depends on *BeginFrameSource |
| 60 // depends on TaskRunner. | 61 // depends on TaskRunner. |
| 61 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 62 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 62 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_; | 63 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_; |
| 63 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_; | 64 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_; |
| 64 scoped_ptr<DisplayScheduler> scheduler_; | 65 scoped_ptr<DisplayScheduler> scheduler_; |
| 65 scoped_ptr<Display> display_; | 66 scoped_ptr<Display> display_; |
| 66 SurfaceDisplayOutputSurface* surface_display_output_surface_; | 67 SurfaceDisplayOutputSurface* surface_display_output_surface_; |
| 67 bool output_surface_lost_; | 68 bool output_surface_lost_; |
| 68 bool disable_display_vsync_; | 69 bool disable_display_vsync_; |
| 69 | 70 |
| 70 private: | 71 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); | 72 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 } // namespace cc | 75 } // namespace cc |
| 75 | 76 |
| 76 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ | 77 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ |
| OLD | NEW |