| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Returns NULL if IOSurface support is missing or GL APIs fail. Specify in | 47 // Returns NULL if IOSurface support is missing or GL APIs fail. Specify in |
| 48 // |order| the desired ordering relationship of the surface to the containing | 48 // |order| the desired ordering relationship of the surface to the containing |
| 49 // window. | 49 // window. |
| 50 static CompositingIOSurfaceMac* Create(SurfaceOrder order); | 50 static CompositingIOSurfaceMac* Create(SurfaceOrder order); |
| 51 ~CompositingIOSurfaceMac(); | 51 ~CompositingIOSurfaceMac(); |
| 52 | 52 |
| 53 // Set IOSurface that will be drawn on the next NSView drawRect. | 53 // Set IOSurface that will be drawn on the next NSView drawRect. |
| 54 void SetIOSurface(uint64 io_surface_handle, | 54 void SetIOSurface(uint64 io_surface_handle, |
| 55 const gfx::Size& size); | 55 const gfx::Size& size); |
| 56 | 56 |
| 57 // Get the CGL renderer ID currently associated with this context. |
| 58 int GetRendererID(); |
| 59 |
| 57 // Blit the IOSurface at the upper-left corner of the |view|. If |view| window | 60 // Blit the IOSurface at the upper-left corner of the |view|. If |view| window |
| 58 // size is larger than the IOSurface, the remaining right and bottom edges | 61 // size is larger than the IOSurface, the remaining right and bottom edges |
| 59 // will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views. | 62 // will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views. |
| 60 // |frame_subscriber| listens to this draw event and provides output buffer | 63 // |frame_subscriber| listens to this draw event and provides output buffer |
| 61 // for copying this frame into. | 64 // for copying this frame into. |
| 62 void DrawIOSurface(NSView* view, float scale_factor, | 65 void DrawIOSurface(NSView* view, float scale_factor, |
| 63 RenderWidgetHostViewFrameSubscriber* frame_subscriber); | 66 RenderWidgetHostViewFrameSubscriber* frame_subscriber); |
| 64 | 67 |
| 65 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef | 68 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef |
| 66 // into |out|. The copied region is specified with |src_pixel_subrect| and | 69 // into |out|. The copied region is specified with |src_pixel_subrect| and |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 uint32 vsync_interval_denominator_; | 318 uint32 vsync_interval_denominator_; |
| 316 | 319 |
| 317 bool initialized_is_intel_; | 320 bool initialized_is_intel_; |
| 318 bool is_intel_; | 321 bool is_intel_; |
| 319 GLint screen_; | 322 GLint screen_; |
| 320 }; | 323 }; |
| 321 | 324 |
| 322 } // namespace content | 325 } // namespace content |
| 323 | 326 |
| 324 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 327 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
| OLD | NEW |