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_ACCELERATED_COMPOSITING_VIEW_MAC_H | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #import <QuartzCore/CVDisplayLink.h> | 9 #import <QuartzCore/CVDisplayLink.h> |
10 #include <QuartzCore/QuartzCore.h> | 10 #include <QuartzCore/QuartzCore.h> |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 CompositingIOSurfaceMac(IOSurfaceSupport* io_surface_support, | 190 CompositingIOSurfaceMac(IOSurfaceSupport* io_surface_support, |
191 NSOpenGLContext* glContext, | 191 NSOpenGLContext* glContext, |
192 CGLContextObj cglContext, | 192 CGLContextObj cglContext, |
193 GLuint shader_program_blit_rgb, | 193 GLuint shader_program_blit_rgb, |
194 GLint blit_rgb_sampler_location, | 194 GLint blit_rgb_sampler_location, |
195 GLuint shader_program_white, | 195 GLuint shader_program_white, |
196 bool is_vsync_disabled, | 196 bool is_vsync_disabled, |
197 CVDisplayLinkRef display_link); | 197 CVDisplayLinkRef display_link); |
198 | 198 |
199 // Issue a draw call to try to flush references to an IOSurface out of | |
200 // the GL driver. | |
201 void DoWorkaroundForIOSurfaceLeak(); | |
202 | |
203 // Returns true if IOSurface is ready to render. False otherwise. | 199 // Returns true if IOSurface is ready to render. False otherwise. |
204 bool MapIOSurfaceToTexture(uint64 io_surface_handle); | 200 bool MapIOSurfaceToTexture(uint64 io_surface_handle); |
205 | 201 |
206 void UnrefIOSurfaceWithContextCurrent(); | 202 void UnrefIOSurfaceWithContextCurrent(); |
207 | 203 |
208 void DrawQuad(const SurfaceQuad& quad); | 204 void DrawQuad(const SurfaceQuad& quad); |
209 | 205 |
210 // Called on display-link thread. | 206 // Called on display-link thread. |
211 void DisplayLinkTick(CVDisplayLinkRef display_link, | 207 void DisplayLinkTick(CVDisplayLinkRef display_link, |
212 const CVTimeStamp* time); | 208 const CVTimeStamp* time); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 278 |
283 // Vsync timing data. | 279 // Vsync timing data. |
284 base::TimeTicks vsync_timebase_; | 280 base::TimeTicks vsync_timebase_; |
285 uint32 vsync_interval_numerator_; | 281 uint32 vsync_interval_numerator_; |
286 uint32 vsync_interval_denominator_; | 282 uint32 vsync_interval_denominator_; |
287 }; | 283 }; |
288 | 284 |
289 } // namespace content | 285 } // namespace content |
290 | 286 |
291 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 287 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
OLD | NEW |