| 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 #include "content/common/gpu/image_transport_surface_overlay_mac.h" | 5 #include "content/common/gpu/image_transport_surface_overlay_mac.h" |
| 6 | 6 |
| 7 #include <IOSurface/IOSurface.h> | 7 #include <IOSurface/IOSurface.h> |
| 8 #include <OpenGL/CGLRenderers.h> | 8 #include <OpenGL/CGLRenderers.h> |
| 9 #include <OpenGL/CGLTypes.h> | 9 #include <OpenGL/CGLTypes.h> |
| 10 #include <OpenGL/GL.h> | 10 #include <OpenGL/gl.h> |
| 11 | 11 |
| 12 // This type consistently causes problem on Mac, and needs to be dealt with | 12 // This type consistently causes problem on Mac, and needs to be dealt with |
| 13 // in a systemic way. | 13 // in a systemic way. |
| 14 // http://crbug.com/517208 | 14 // http://crbug.com/517208 |
| 15 #ifndef GL_OES_EGL_image | 15 #ifndef GL_OES_EGL_image |
| 16 typedef void* GLeglImageOES; | 16 typedef void* GLeglImageOES; |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 #include "base/mac/scoped_cftyperef.h" | 19 #include "base/mac/scoped_cftyperef.h" |
| 20 #include "content/common/gpu/gpu_messages.h" | 20 #include "content/common/gpu/gpu_messages.h" |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // Compute the previous vsync time. | 505 // Compute the previous vsync time. |
| 506 base::TimeTicks previous_vsync = | 506 base::TimeTicks previous_vsync = |
| 507 vsync_interval_ * ((from - vsync_timebase_) / vsync_interval_) + | 507 vsync_interval_ * ((from - vsync_timebase_) / vsync_interval_) + |
| 508 vsync_timebase_; | 508 vsync_timebase_; |
| 509 | 509 |
| 510 // Return |interval_fraction| through the next vsync. | 510 // Return |interval_fraction| through the next vsync. |
| 511 return previous_vsync + (1 + interval_fraction) * vsync_interval_; | 511 return previous_vsync + (1 + interval_fraction) * vsync_interval_; |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace content | 514 } // namespace content |
| OLD | NEW |