| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <IOSurface/IOSurfaceAPI.h> | 9 #include <IOSurface/IOSurfaceAPI.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 | 36 |
| 37 class BrowserCompositorViewMacInternal; | 37 class BrowserCompositorViewMacInternal; |
| 38 | 38 |
| 39 // The interface through which BrowserCompositorViewMac calls back into | 39 // The interface through which BrowserCompositorViewMac calls back into |
| 40 // RenderWidgetHostViewMac (or any other structure that wishes to draw a | 40 // RenderWidgetHostViewMac (or any other structure that wishes to draw a |
| 41 // NSView backed by a ui::Compositor). | 41 // NSView backed by a ui::Compositor). |
| 42 class BrowserCompositorViewMacClient { | 42 class BrowserCompositorViewMacClient { |
| 43 public: | 43 public: |
| 44 // Drawing is usually throttled by the rate at which CoreAnimation draws |
| 45 // frames to the screen. This can be used to disable throttling. |
| 46 virtual bool BrowserCompositorViewShouldAckImmediately() const = 0; |
| 47 |
| 44 // Called when a frame is drawn, and used to pass latency info back to the | 48 // Called when a frame is drawn, and used to pass latency info back to the |
| 45 // renderer (if any). | 49 // renderer (if any). |
| 46 virtual void BrowserCompositorViewFrameSwapped( | 50 virtual void BrowserCompositorViewFrameSwapped( |
| 47 const std::vector<ui::LatencyInfo>& latency_info) = 0; | 51 const std::vector<ui::LatencyInfo>& latency_info) = 0; |
| 48 | 52 |
| 49 // Used to install the ui::Compositor-backed NSView as a child of its parent | 53 // Used to install the ui::Compositor-backed NSView as a child of its parent |
| 50 // view. | 54 // view. |
| 51 virtual NSView* BrowserCompositorSuperview() = 0; | 55 virtual NSView* BrowserCompositorSuperview() = 0; |
| 52 | 56 |
| 53 // Used to install the root ui::Layer into the ui::Compositor. | 57 // Used to install the root ui::Layer into the ui::Compositor. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 83 // next BrowserCompositorViewMac to be created will be be created quickly. | 87 // next BrowserCompositorViewMac to be created will be be created quickly. |
| 84 class BrowserCompositorViewPlaceholderMac { | 88 class BrowserCompositorViewPlaceholderMac { |
| 85 public: | 89 public: |
| 86 BrowserCompositorViewPlaceholderMac(); | 90 BrowserCompositorViewPlaceholderMac(); |
| 87 ~BrowserCompositorViewPlaceholderMac(); | 91 ~BrowserCompositorViewPlaceholderMac(); |
| 88 }; | 92 }; |
| 89 | 93 |
| 90 } // namespace content | 94 } // namespace content |
| 91 | 95 |
| 92 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 96 #endif // CONTENT_BROWSER_COMPOSITOR_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| OLD | NEW |