Chromium Code Reviews| 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_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 // is visible. | 43 // is visible. |
| 44 // - The RenderWidgetHostViewMac that is used to display these frames is | 44 // - The RenderWidgetHostViewMac that is used to display these frames is |
| 45 // attached to the NSView hierarchy of an NSWindow. | 45 // attached to the NSView hierarchy of an NSWindow. |
| 46 class BrowserCompositorMac : public cc::BeginFrameObserver, | 46 class BrowserCompositorMac : public cc::BeginFrameObserver, |
| 47 public DelegatedFrameHostClient { | 47 public DelegatedFrameHostClient { |
| 48 public: | 48 public: |
| 49 BrowserCompositorMac( | 49 BrowserCompositorMac( |
| 50 ui::AcceleratedWidgetMacNSView* accelerated_widget_mac_ns_view, | 50 ui::AcceleratedWidgetMacNSView* accelerated_widget_mac_ns_view, |
| 51 BrowserCompositorMacClient* client, | 51 BrowserCompositorMacClient* client, |
| 52 bool render_widget_host_is_hidden, | 52 bool render_widget_host_is_hidden, |
| 53 bool ns_view_attached_to_window); | 53 bool ns_view_attached_to_window, |
| 54 cc::FrameSinkId frame_sink_id); | |
|
Fady Samuel
2017/01/25 23:23:48
const cc::FrameSinkId&
| |
| 54 ~BrowserCompositorMac() override; | 55 ~BrowserCompositorMac() override; |
| 55 | 56 |
| 56 // These will not return nullptr until Destroy is called. | 57 // These will not return nullptr until Destroy is called. |
| 57 DelegatedFrameHost* GetDelegatedFrameHost(); | 58 DelegatedFrameHost* GetDelegatedFrameHost(); |
| 58 | 59 |
| 59 // This may return nullptr, if this has detached itself from its | 60 // This may return nullptr, if this has detached itself from its |
| 60 // ui::Compositor. | 61 // ui::Compositor. |
| 61 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac(); | 62 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac(); |
| 62 | 63 |
| 63 void SwapCompositorFrame(uint32_t compositor_frame_sink_id, | 64 void SwapCompositorFrame(uint32_t compositor_frame_sink_id, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 cc::BeginFrameSource* begin_frame_source_ = nullptr; | 181 cc::BeginFrameSource* begin_frame_source_ = nullptr; |
| 181 cc::BeginFrameArgs last_begin_frame_args_; | 182 cc::BeginFrameArgs last_begin_frame_args_; |
| 182 bool needs_begin_frames_ = false; | 183 bool needs_begin_frames_ = false; |
| 183 | 184 |
| 184 base::WeakPtrFactory<BrowserCompositorMac> weak_factory_; | 185 base::WeakPtrFactory<BrowserCompositorMac> weak_factory_; |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 } // namespace content | 188 } // namespace content |
| 188 | 189 |
| 189 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 190 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| OLD | NEW |