OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LAYER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // in response to receiving a new compositor frame, or from any of the events | 25 // in response to receiving a new compositor frame, or from any of the events |
26 // that cause setNeedsDisplay to be called on the layer. | 26 // that cause setNeedsDisplay to be called on the layer. |
27 BOOL needsDisplay_; | 27 BOOL needsDisplay_; |
28 } | 28 } |
29 | 29 |
30 @property(nonatomic, readonly) | 30 @property(nonatomic, readonly) |
31 scoped_refptr<content::CompositingIOSurfaceContext> context; | 31 scoped_refptr<content::CompositingIOSurfaceContext> context; |
32 | 32 |
33 - (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r; | 33 - (id)initWithRenderWidgetHostViewMac:(content::RenderWidgetHostViewMac*)r; |
34 | 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 | 35 // Remove this layer from the layer heirarchy, and mark that |
40 // |renderWidgetHostView_| is no longer valid and may no longer be dereferenced. | 36 // |renderWidgetHostView_| is no longer valid and may no longer be dereferenced. |
41 - (void)disableCompositing; | 37 - (void)disableCompositing; |
42 | 38 |
43 // Called when a new frame is received. | 39 // Called when a new frame is received. |
44 - (void)gotNewFrame; | 40 - (void)gotNewFrame; |
45 | 41 |
46 // Called when it has been a while since a new frame has been received, and the | 42 // Called when it has been a while since a new frame has been received, and the |
47 // layer should become not-asynchronous. | 43 // layer should become not-asynchronous. |
48 - (void)timerSinceGotNewFrameFired; | 44 - (void)timerSinceGotNewFrameFired; |
49 | 45 |
50 @end | 46 @end |
51 | 47 |
52 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 48 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ |
OLD | NEW |