| OLD | NEW | 
| (Empty) |  | 
 |   1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 
 |   2 // Use of this source code is governed by a BSD-style license that can be | 
 |   3 // found in the LICENSE file. | 
 |   4  | 
 |   5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 
 |   6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 
 |   7  | 
 |   8 #import <Cocoa/Cocoa.h> | 
 |   9  | 
 |  10 #include "base/mac/scoped_cftyperef.h" | 
 |  11 #include "base/memory/ref_counted.h" | 
 |  12  | 
 |  13 namespace content { | 
 |  14 class CompositingIOSurfaceContext; | 
 |  15 class RenderWidgetHostViewMac; | 
 |  16 } | 
 |  17  | 
 |  18 // The CoreAnimation layer for drawing accelerated content. | 
 |  19 @interface CompositingIOSurfaceLayer : CAOpenGLLayer { | 
 |  20  @private | 
 |  21   content::RenderWidgetHostViewMac* renderWidgetHostView_; | 
 |  22   scoped_refptr<content::CompositingIOSurfaceContext> context_; | 
 |  23 } | 
 |  24  | 
 |  25 @property(nonatomic, readonly) | 
 |  26     scoped_refptr<content::CompositingIOSurfaceContext> context; | 
 |  27  | 
 |  28 - (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r; | 
 |  29  | 
 |  30 // The OpenGL context may be destroyed periodically (e.g, when moving across | 
 |  31 // displays). This will re-allocate the context if need be, and returns whether | 
 |  32 // or not the context now exists. | 
 |  33 - (BOOL)ensureContext; | 
 |  34  | 
 |  35 // Update the scale factor of the layer to match the scale factor of the | 
 |  36 // IOSurface. | 
 |  37 - (void)updateScaleFactor; | 
 |  38  | 
 |  39 // Remove this layer from the layer heirarchy, and mark that | 
 |  40 // |renderWidgetHostView_| is no longer valid and may no longer be dereferenced. | 
 |  41 - (void)disableCompositing; | 
 |  42  | 
 |  43 @end | 
 |  44  | 
 |  45 #endif  // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 
| OLD | NEW |