Chromium Code Reviews| 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 COMPONENTS_MUS_DISPLAY_MANAGER_H_ | 5 #ifndef COMPONENTS_MUS_DISPLAY_MANAGER_H_ |
| 6 #define COMPONENTS_MUS_DISPLAY_MANAGER_H_ | 6 #define COMPONENTS_MUS_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 void Init(DisplayManagerDelegate* delegate) override; | 96 void Init(DisplayManagerDelegate* delegate) override; |
| 97 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override; | 97 void SchedulePaint(const ServerView* view, const gfx::Rect& bounds) override; |
| 98 void SetViewportSize(const gfx::Size& size) override; | 98 void SetViewportSize(const gfx::Size& size) override; |
| 99 void SetTitle(const base::string16& title) override; | 99 void SetTitle(const base::string16& title) override; |
| 100 const mojo::ViewportMetrics& GetViewportMetrics() override; | 100 const mojo::ViewportMetrics& GetViewportMetrics() override; |
| 101 void UpdateTextInputState(const ui::TextInputState& state) override; | 101 void UpdateTextInputState(const ui::TextInputState& state) override; |
| 102 void SetImeVisibility(bool visible) override; | 102 void SetImeVisibility(bool visible) override; |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 void WantToDraw(); | 105 void WantToDraw(); |
| 106 | |
| 107 // This method initiates a top level redraw of the display. | |
| 108 // TODO(fsamuel): This should use vblank as a signal rather than a timer | |
| 109 // http://crbug.com/533042 | |
| 106 void Draw(); | 110 void Draw(); |
| 111 | |
| 112 // This is called after cc::Display has completed generating a new frame | |
|
rjkroege
2015/09/17 20:21:20
I note in passing that this is where we should be
Fady Samuel
2015/09/17 21:44:18
Added a comment.
| |
| 113 // for the display. | |
| 107 void DidDraw(); | 114 void DidDraw(); |
| 108 void UpdateMetrics(const gfx::Size& size, float device_pixel_ratio); | 115 void UpdateMetrics(const gfx::Size& size, float device_pixel_ratio); |
| 116 scoped_ptr<cc::CompositorFrame> GenerateCompositorFrame(); | |
| 117 const cc::CompositorFrame* GetLastCompositorFrame() const; | |
| 109 | 118 |
| 110 // ui::PlatformWindowDelegate: | 119 // ui::PlatformWindowDelegate: |
| 111 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | 120 void OnBoundsChanged(const gfx::Rect& new_bounds) override; |
| 112 void OnDamageRect(const gfx::Rect& damaged_region) override; | 121 void OnDamageRect(const gfx::Rect& damaged_region) override; |
| 113 void DispatchEvent(ui::Event* event) override; | 122 void DispatchEvent(ui::Event* event) override; |
| 114 void OnCloseRequest() override; | 123 void OnCloseRequest() override; |
| 115 void OnClosed() override; | 124 void OnClosed() override; |
| 116 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | 125 void OnWindowStateChanged(ui::PlatformWindowState new_state) override; |
| 117 void OnLostCapture() override; | 126 void OnLostCapture() override; |
| 118 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, | 127 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 134 scoped_ptr<ui::PlatformWindow> platform_window_; | 143 scoped_ptr<ui::PlatformWindow> platform_window_; |
| 135 | 144 |
| 136 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; | 145 base::WeakPtrFactory<DefaultDisplayManager> weak_factory_; |
| 137 | 146 |
| 138 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); | 147 DISALLOW_COPY_AND_ASSIGN(DefaultDisplayManager); |
| 139 }; | 148 }; |
| 140 | 149 |
| 141 } // namespace mus | 150 } // namespace mus |
| 142 | 151 |
| 143 #endif // COMPONENTS_MUS_DISPLAY_MANAGER_H_ | 152 #endif // COMPONENTS_MUS_DISPLAY_MANAGER_H_ |
| OLD | NEW |