| 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 CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // cc::DisplayClient implementation. | 40 // cc::DisplayClient implementation. |
| 41 void DisplayDamaged() override; | 41 void DisplayDamaged() override; |
| 42 void DidSwapBuffers() override; | 42 void DidSwapBuffers() override; |
| 43 void DidSwapBuffersComplete() override; | 43 void DidSwapBuffersComplete() override; |
| 44 void CommitVSyncParameters(base::TimeTicks timebase, | 44 void CommitVSyncParameters(base::TimeTicks timebase, |
| 45 base::TimeDelta interval) override; | 45 base::TimeDelta interval) override; |
| 46 void OutputSurfaceLost() override; | 46 void OutputSurfaceLost() override; |
| 47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; | 47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; |
| 48 | 48 |
| 49 bool output_surface_lost() { return output_surface_lost_; } |
| 50 |
| 49 private: | 51 private: |
| 50 void ScheduleDraw(); | 52 void ScheduleDraw(); |
| 51 void Draw(); | 53 void Draw(); |
| 52 | 54 |
| 53 scoped_ptr<cc::OutputSurface> output_surface_; | 55 scoped_ptr<cc::OutputSurface> output_surface_; |
| 54 scoped_ptr<cc::Display> display_; | 56 scoped_ptr<cc::Display> display_; |
| 55 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 57 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 56 SurfaceDisplayOutputSurface* surface_display_output_surface_; | 58 SurfaceDisplayOutputSurface* surface_display_output_surface_; |
| 57 bool scheduled_draw_; | 59 bool scheduled_draw_; |
| 58 bool output_surface_lost_; | 60 bool output_surface_lost_; |
| 59 // True if a draw should be scheduled, but it's hit the limit on max frames | 61 // True if a draw should be scheduled, but it's hit the limit on max frames |
| 60 // pending. | 62 // pending. |
| 61 bool deferred_draw_; | 63 bool deferred_draw_; |
| 62 int pending_frames_; | 64 int pending_frames_; |
| 63 | 65 |
| 64 base::WeakPtrFactory<OnscreenDisplayClient> weak_ptr_factory_; | 66 base::WeakPtrFactory<OnscreenDisplayClient> weak_ptr_factory_; |
| 65 | 67 |
| 66 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); | 68 DISALLOW_COPY_AND_ASSIGN(OnscreenDisplayClient); |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace content | 71 } // namespace content |
| 70 | 72 |
| 71 #endif // CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ | 73 #endif // CONTENT_BROWSER_COMPOSITOR_ONSCREEN_DISPLAY_CLIENT_H_ |
| OLD | NEW |