| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ |
| 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // argument to avoid redundant calls to base::TimeTicks::Now. | 90 // argument to avoid redundant calls to base::TimeTicks::Now. |
| 91 void PostCheckPendingSwapsCallbackIfNeeded(const base::TimeTicks& now); | 91 void PostCheckPendingSwapsCallbackIfNeeded(const base::TimeTicks& now); |
| 92 | 92 |
| 93 // Return the time of |interval_fraction| of the way through the next | 93 // Return the time of |interval_fraction| of the way through the next |
| 94 // vsync period that starts after |from|. If the vsync parameters are not | 94 // vsync period that starts after |from|. If the vsync parameters are not |
| 95 // valid then return |from|. | 95 // valid then return |from|. |
| 96 base::TimeTicks GetNextVSyncTimeAfter( | 96 base::TimeTicks GetNextVSyncTimeAfter( |
| 97 const base::TimeTicks& from, double interval_fraction); | 97 const base::TimeTicks& from, double interval_fraction); |
| 98 | 98 |
| 99 scoped_ptr<ImageTransportHelper> helper_; | 99 scoped_ptr<ImageTransportHelper> helper_; |
| 100 bool use_remote_layer_api_; |
| 100 base::scoped_nsobject<CAContext> ca_context_; | 101 base::scoped_nsobject<CAContext> ca_context_; |
| 101 base::scoped_nsobject<CALayer> ca_root_layer_; | 102 base::scoped_nsobject<CALayer> ca_root_layer_; |
| 102 | 103 |
| 103 gfx::Size pixel_size_; | 104 gfx::Size pixel_size_; |
| 104 float scale_factor_; | 105 float scale_factor_; |
| 105 std::vector<ui::LatencyInfo> latency_info_; | 106 std::vector<ui::LatencyInfo> latency_info_; |
| 106 | 107 |
| 107 // The renderer ID that all contexts made current to this surface should be | 108 // The renderer ID that all contexts made current to this surface should be |
| 108 // targeting. | 109 // targeting. |
| 109 GLint gl_renderer_id_; | 110 GLint gl_renderer_id_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 132 base::TimeTicks vsync_timebase_; | 133 base::TimeTicks vsync_timebase_; |
| 133 base::TimeDelta vsync_interval_; | 134 base::TimeDelta vsync_interval_; |
| 134 | 135 |
| 135 base::Timer display_pending_swap_timer_; | 136 base::Timer display_pending_swap_timer_; |
| 136 base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_; | 137 base::WeakPtrFactory<ImageTransportSurfaceOverlayMac> weak_factory_; |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 } // namespace content | 140 } // namespace content |
| 140 | 141 |
| 141 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ | 142 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ |
| OLD | NEW |