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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 // Returns NULL if IOSurface support is missing or GL APIs fail. Specify in | 43 // Returns NULL if IOSurface support is missing or GL APIs fail. Specify in |
44 // |order| the desired ordering relationship of the surface to the containing | 44 // |order| the desired ordering relationship of the surface to the containing |
45 // window. | 45 // window. |
46 static CompositingIOSurfaceMac* Create(SurfaceOrder order); | 46 static CompositingIOSurfaceMac* Create(SurfaceOrder order); |
47 ~CompositingIOSurfaceMac(); | 47 ~CompositingIOSurfaceMac(); |
48 | 48 |
49 // Set IOSurface that will be drawn on the next NSView drawRect. | 49 // Set IOSurface that will be drawn on the next NSView drawRect. |
50 void SetIOSurface(uint64 io_surface_handle, | 50 void SetIOSurface(uint64 io_surface_handle, |
51 const gfx::Size& size); | 51 const gfx::Size& size); |
52 | 52 |
53 // Get the CGL renderer currently associated with this context. | |
Ken Russell (switch to Gerrit)
2013/03/01 22:00:58
Please adjust renderer -> renderer ID for clarity.
jbauman
2013/03/02 03:52:23
Ok, done everywhere.
| |
54 int GetRenderer(); | |
55 | |
53 // Blit the IOSurface at the upper-left corner of the |view|. If |view| window | 56 // Blit the IOSurface at the upper-left corner of the |view|. If |view| window |
54 // size is larger than the IOSurface, the remaining right and bottom edges | 57 // size is larger than the IOSurface, the remaining right and bottom edges |
55 // will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views. | 58 // will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views. |
56 void DrawIOSurface(NSView* view, float scale_factor); | 59 void DrawIOSurface(NSView* view, float scale_factor); |
57 | 60 |
58 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef | 61 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef |
59 // into |out|. The copied region is specified with |src_pixel_subrect| and | 62 // into |out|. The copied region is specified with |src_pixel_subrect| and |
60 // the data is transformed so that it fits in |dst_pixel_size|. | 63 // the data is transformed so that it fits in |dst_pixel_size|. |
61 // |src_pixel_subrect| and |dst_pixel_size| are not in DIP but in pixel. | 64 // |src_pixel_subrect| and |dst_pixel_size| are not in DIP but in pixel. |
62 // Caller must ensure that |out| is allocated to dimensions that match | 65 // Caller must ensure that |out| is allocated to dimensions that match |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 uint32 vsync_interval_denominator_; | 293 uint32 vsync_interval_denominator_; |
291 | 294 |
292 bool initialized_is_intel_; | 295 bool initialized_is_intel_; |
293 bool is_intel_; | 296 bool is_intel_; |
294 GLint screen_; | 297 GLint screen_; |
295 }; | 298 }; |
296 | 299 |
297 } // namespace content | 300 } // namespace content |
298 | 301 |
299 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H | 302 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_COMPOSITING_VIEW_MAC_H |
OLD | NEW |