| 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 <list> | 9 #include <list> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Get the CGL renderer ID currently associated with this context. | 59 // Get the CGL renderer ID currently associated with this context. |
| 60 int GetRendererID(); | 60 int GetRendererID(); |
| 61 | 61 |
| 62 // Blit the IOSurface to the rectangle specified by |window_rect| in DIPs, | 62 // Blit the IOSurface to the rectangle specified by |window_rect| in DIPs, |
| 63 // with the origin in the lower left corner. If the window rect's size is | 63 // with the origin in the lower left corner. If the window rect's size is |
| 64 // larger than the IOSurface, the remaining right and bottom edges will be | 64 // larger than the IOSurface, the remaining right and bottom edges will be |
| 65 // white. |window_scale_factor| is 1 in normal views, 2 in HiDPI views. | 65 // white. |window_scale_factor| is 1 in normal views, 2 in HiDPI views. |
| 66 bool DrawIOSurface( | 66 bool DrawIOSurface( |
| 67 scoped_refptr<CompositingIOSurfaceContext> drawing_context, | 67 scoped_refptr<CompositingIOSurfaceContext> drawing_context, |
| 68 const gfx::Rect& window_rect, | 68 const gfx::Rect& window_rect, |
| 69 float window_scale_factor, | 69 float window_scale_factor) WARN_UNUSED_RESULT; |
| 70 bool flush_drawable) WARN_UNUSED_RESULT; | |
| 71 | 70 |
| 72 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef | 71 // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef |
| 73 // into |out|. The copied region is specified with |src_pixel_subrect| and | 72 // into |out|. The copied region is specified with |src_pixel_subrect| and |
| 74 // the data is transformed so that it fits in |dst_pixel_size|. | 73 // the data is transformed so that it fits in |dst_pixel_size|. |
| 75 // |src_pixel_subrect| and |dst_pixel_size| are not in DIP but in pixel. | 74 // |src_pixel_subrect| and |dst_pixel_size| are not in DIP but in pixel. |
| 76 // Caller must ensure that |out| is allocated to dimensions that match | 75 // Caller must ensure that |out| is allocated to dimensions that match |
| 77 // dst_pixel_size, with no additional padding. | 76 // dst_pixel_size, with no additional padding. |
| 78 // |callback| is invoked when the operation is completed or failed. | 77 // |callback| is invoked when the operation is completed or failed. |
| 79 // Do no call this method again before |callback| is invoked. | 78 // Do no call this method again before |callback| is invoked. |
| 80 void CopyTo(const gfx::Rect& src_pixel_subrect, | 79 void CopyTo(const gfx::Rect& src_pixel_subrect, |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 322 |
| 324 static void EvictionScheduleDoEvict(); | 323 static void EvictionScheduleDoEvict(); |
| 325 static void EvictionDoEvict(); | 324 static void EvictionDoEvict(); |
| 326 static base::LazyInstance<EvictionQueue> eviction_queue_; | 325 static base::LazyInstance<EvictionQueue> eviction_queue_; |
| 327 static bool eviction_scheduled_; | 326 static bool eviction_scheduled_; |
| 328 }; | 327 }; |
| 329 | 328 |
| 330 } // namespace content | 329 } // namespace content |
| 331 | 330 |
| 332 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ | 331 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_MAC_H_ |
| OLD | NEW |