| 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 UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ | 5 #ifndef UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ |
| 6 #define UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ | 6 #define UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurface.h> | 8 #include <IOSurface/IOSurface.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 void SetNSView(AcceleratedWidgetMacNSView* view); | 60 void SetNSView(AcceleratedWidgetMacNSView* view); |
| 61 void ResetNSView(); | 61 void ResetNSView(); |
| 62 | 62 |
| 63 // Fullscreen low power mode interface. | 63 // Fullscreen low power mode interface. |
| 64 void SetFullscreenLowPowerCoordinator( | 64 void SetFullscreenLowPowerCoordinator( |
| 65 FullscreenLowPowerCoordinator* coordinator); | 65 FullscreenLowPowerCoordinator* coordinator); |
| 66 void ResetFullscreenLowPowerCoordinator(); | 66 void ResetFullscreenLowPowerCoordinator(); |
| 67 CALayer* GetFullscreenLowPowerLayer() const; | 67 CALayer* GetFullscreenLowPowerLayer() const; |
| 68 | 68 |
| 69 // Returns true if the widget might be in fullscreen low power mode. This |
| 70 // will return a conservative answer. |
| 71 bool MightBeInFullscreenLowPowerMode() const; |
| 72 |
| 69 // Return true if the last frame swapped has a size in DIP of |dip_size|. | 73 // Return true if the last frame swapped has a size in DIP of |dip_size|. |
| 70 bool HasFrameOfSize(const gfx::Size& dip_size) const; | 74 bool HasFrameOfSize(const gfx::Size& dip_size) const; |
| 71 | 75 |
| 72 // Populate the vsync parameters for the surface's display. | 76 // Populate the vsync parameters for the surface's display. |
| 73 void GetVSyncParameters( | 77 void GetVSyncParameters( |
| 74 base::TimeTicks* timebase, base::TimeDelta* interval) const; | 78 base::TimeTicks* timebase, base::TimeDelta* interval) const; |
| 75 | 79 |
| 76 void GotFrame(CAContextID ca_context_id, | 80 void GotFrame(CAContextID ca_context_id, |
| 77 bool fullscreen_low_power_ca_context_valid, | 81 bool fullscreen_low_power_ca_context_valid, |
| 78 CAContextID fullscreen_low_power_ca_context_id, | 82 CAContextID fullscreen_low_power_ca_context_id, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 CAContextID fullscreen_low_power_ca_context_id, | 146 CAContextID fullscreen_low_power_ca_context_id, |
| 143 base::ScopedCFTypeRef<IOSurfaceRef> io_surface, | 147 base::ScopedCFTypeRef<IOSurfaceRef> io_surface, |
| 144 const gfx::Size& pixel_size, | 148 const gfx::Size& pixel_size, |
| 145 float scale_factor, | 149 float scale_factor, |
| 146 base::TimeTicks* vsync_timebase, | 150 base::TimeTicks* vsync_timebase, |
| 147 base::TimeDelta* vsync_interval); | 151 base::TimeDelta* vsync_interval); |
| 148 | 152 |
| 149 } // namespace ui | 153 } // namespace ui |
| 150 | 154 |
| 151 #endif // UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ | 155 #endif // UI_ACCELERATED_WIDGET_MAC_ACCELERATED_WIDGET_MAC_H_ |
| OLD | NEW |