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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
13 | 13 |
14 @class CompositingIOSurfaceLayer; | 14 @class CompositingIOSurfaceLayer; |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class CompositingIOSurfaceMac; | 17 class CompositingIOSurfaceMac; |
18 class CompositingIOSurfaceContext; | 18 class CompositingIOSurfaceContext; |
19 | 19 |
20 // The interface through which the CompositingIOSurfaceLayer calls back into | 20 // The interface through which the CompositingIOSurfaceLayer calls back into |
21 // the structrue that created it (RenderWidgetHostViewMac or | 21 // the structrue that created it (RenderWidgetHostViewMac or |
22 // BrowserCompositorViewMac). | 22 // BrowserCompositorViewMac). |
23 class CompositingIOSurfaceLayerClient { | 23 class CompositingIOSurfaceLayerClient { |
24 public: | 24 public: |
| 25 virtual bool AcceleratedLayerShouldAckImmediately() const = 0; |
25 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) = 0; | 26 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) = 0; |
26 }; | 27 }; |
27 | 28 |
28 // CompositingIOSurfaceLayerHelper provides C++ functionality needed for the | 29 // CompositingIOSurfaceLayerHelper provides C++ functionality needed for the |
29 // CompositingIOSurfaceLayer class, and does most of the heavy lifting for the | 30 // CompositingIOSurfaceLayer class, and does most of the heavy lifting for the |
30 // class. | 31 // class. |
31 // TODO(ccameron): This class should own CompositingIOSurfaceLayer, rather than | 32 // TODO(ccameron): This class should own CompositingIOSurfaceLayer, rather than |
32 // vice versa. | 33 // vice versa. |
33 class CompositingIOSurfaceLayerHelper { | 34 class CompositingIOSurfaceLayerHelper { |
34 public: | 35 public: |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Mark that the client is no longer valid and cannot be called back into. This | 110 // Mark that the client is no longer valid and cannot be called back into. This |
110 // must be called before the layer is destroyed. | 111 // must be called before the layer is destroyed. |
111 - (void)resetClient; | 112 - (void)resetClient; |
112 | 113 |
113 // Called when a new frame is received. | 114 // Called when a new frame is received. |
114 - (void)gotNewFrame; | 115 - (void)gotNewFrame; |
115 | 116 |
116 @end | 117 @end |
117 | 118 |
118 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ | 119 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ |
OLD | NEW |