| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // DisplayClient implementation. | 46 // DisplayClient implementation. |
| 47 void CommitVSyncParameters(base::TimeTicks timebase, | 47 void CommitVSyncParameters(base::TimeTicks timebase, |
| 48 base::TimeDelta interval) override; | 48 base::TimeDelta interval) override; |
| 49 void OutputSurfaceLost() override; | 49 void OutputSurfaceLost() override; |
| 50 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 50 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 51 | 51 |
| 52 bool output_surface_lost() { return output_surface_lost_; } | 52 bool output_surface_lost() { return output_surface_lost_; } |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 scoped_ptr<OutputSurface> output_surface_; | 55 scoped_ptr<OutputSurface> output_surface_; |
| 56 scoped_ptr<Display> display_; | 56 // Be careful of destruction order: |
| 57 // Display depends on DisplayScheduler depends on *BeginFrameSource |
| 58 // depends on TaskRunner. |
| 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 57 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_; | 60 scoped_ptr<SyntheticBeginFrameSource> synthetic_frame_source_; |
| 58 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_; | 61 scoped_ptr<BackToBackBeginFrameSource> unthrottled_frame_source_; |
| 59 scoped_ptr<DisplayScheduler> scheduler_; | 62 scoped_ptr<DisplayScheduler> scheduler_; |
| 60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 63 scoped_ptr<Display> display_; |
| 61 SurfaceDisplayOutputSurface* surface_display_output_surface_; | 64 SurfaceDisplayOutputSurface* surface_display_output_surface_; |
| 62 bool output_surface_lost_; | 65 bool output_surface_lost_; |
| 63 bool disable_display_vsync_; | 66 bool disable_display_vsync_; |
| 64 | 67 |
| 65 private: | 68 private: |
| 66 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); | 69 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 } // namespace cc | 72 } // namespace cc |
| 70 | 73 |
| 71 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ | 74 #endif // CC_SURFACES_ONSCREEN_DISPLAY_CLIENT_H_ |
| OLD | NEW |