| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class CompositingIOSurfaceMac { | 46 class CompositingIOSurfaceMac { |
| 47 public: | 47 public: |
| 48 // Returns NULL if IOSurface support is missing or GL APIs fail. | 48 // Returns NULL if IOSurface support is missing or GL APIs fail. |
| 49 static CompositingIOSurfaceMac* Create(); | 49 static CompositingIOSurfaceMac* Create(); |
| 50 ~CompositingIOSurfaceMac(); | 50 ~CompositingIOSurfaceMac(); |
| 51 | 51 |
| 52 // Set IOSurface that will be drawn on the next NSView drawRect. | 52 // Set IOSurface that will be drawn on the next NSView drawRect. |
| 53 bool SetIOSurface(uint64 io_surface_handle, | 53 bool SetIOSurface(uint64 io_surface_handle, |
| 54 const gfx::Size& size, | 54 const gfx::Size& size, |
| 55 float scale_factor, | 55 float scale_factor, |
| 56 const ui::LatencyInfo& latency_info); | 56 const std::vector<ui::LatencyInfo>& latency_info); |
| 57 | 57 |
| 58 // Get the CGL renderer ID currently associated with this context. | 58 // Get the CGL renderer ID currently associated with this context. |
| 59 int GetRendererID(); | 59 int GetRendererID(); |
| 60 | 60 |
| 61 // Blit the IOSurface to the rectangle specified by |window_rect| in DIPs, | 61 // Blit the IOSurface to the rectangle specified by |window_rect| in DIPs, |
| 62 // with the origin in the lower left corner. If the window rect's size is | 62 // with the origin in the lower left corner. If the window rect's size is |
| 63 // larger than the IOSurface, the remaining right and bottom edges will be | 63 // larger than the IOSurface, the remaining right and bottom edges will be |
| 64 // white. |window_scale_factor| is 1 in normal views, 2 in HiDPI views. | 64 // white. |window_scale_factor| is 1 in normal views, 2 in HiDPI views. |
| 65 // |frame_subscriber| listens to this draw event and provides output buffer | 65 // |frame_subscriber| listens to this draw event and provides output buffer |
| 66 // for copying this frame into. | 66 // for copying this frame into. |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 base::Lock lock_; | 338 base::Lock lock_; |
| 339 | 339 |
| 340 // Vsync timing data. | 340 // Vsync timing data. |
| 341 base::TimeTicks vsync_timebase_; | 341 base::TimeTicks vsync_timebase_; |
| 342 uint32 vsync_interval_numerator_; | 342 uint32 vsync_interval_numerator_; |
| 343 uint32 vsync_interval_denominator_; | 343 uint32 vsync_interval_denominator_; |
| 344 | 344 |
| 345 // Error saved by GetAndSaveGLError | 345 // Error saved by GetAndSaveGLError |
| 346 GLint gl_error_; | 346 GLint gl_error_; |
| 347 | 347 |
| 348 ui::LatencyInfo latency_info_; | 348 std::vector<ui::LatencyInfo> latency_info_; |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 } // namespace content | 351 } // namespace content |
| 352 | 352 |
| 353 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ | 353 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ |
| OLD | NEW |