| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 // These functions will track the number of outstanding copy requests, and | 84 // These functions will track the number of outstanding copy requests, and |
| 85 // will not allow the ui::Compositor to be detached until all outstanding | 85 // will not allow the ui::Compositor to be detached until all outstanding |
| 86 // copies have returned. | 86 // copies have returned. |
| 87 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, | 87 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, |
| 88 const gfx::Size& dst_size, | 88 const gfx::Size& dst_size, |
| 89 const ReadbackRequestCallback& callback, | 89 const ReadbackRequestCallback& callback, |
| 90 SkColorType preferred_color_type); | 90 SkColorType preferred_color_type); |
| 91 void CopyFromCompositingSurfaceToVideoFrame( | 91 void CopyFromCompositingSurfaceToVideoFrame( |
| 92 const gfx::Rect& src_subrect, | 92 const gfx::Rect& src_subrect, |
| 93 const scoped_refptr<media::VideoFrame>& target, | 93 scoped_refptr<media::VideoFrame> target, |
| 94 const base::Callback<void(const gfx::Rect&, bool)>& callback); | 94 const base::Callback<void(const gfx::Rect&, bool)>& callback); |
| 95 | 95 |
| 96 // Indicate that the recyclable compositor should be destroyed, and no future | 96 // Indicate that the recyclable compositor should be destroyed, and no future |
| 97 // compositors should be recycled. | 97 // compositors should be recycled. |
| 98 static void DisableRecyclingForShutdown(); | 98 static void DisableRecyclingForShutdown(); |
| 99 | 99 |
| 100 // DelegatedFrameHostClient implementation. | 100 // DelegatedFrameHostClient implementation. |
| 101 ui::Layer* DelegatedFrameHostGetLayer() const override; | 101 ui::Layer* DelegatedFrameHostGetLayer() const override; |
| 102 bool DelegatedFrameHostIsVisible() const override; | 102 bool DelegatedFrameHostIsVisible() const override; |
| 103 SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override; | 103 SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 cc::BeginFrameSource* begin_frame_source_ = nullptr; | 181 cc::BeginFrameSource* begin_frame_source_ = nullptr; |
| 182 cc::BeginFrameArgs last_begin_frame_args_; | 182 cc::BeginFrameArgs last_begin_frame_args_; |
| 183 bool needs_begin_frames_ = false; | 183 bool needs_begin_frames_ = false; |
| 184 | 184 |
| 185 base::WeakPtrFactory<BrowserCompositorMac> weak_factory_; | 185 base::WeakPtrFactory<BrowserCompositorMac> weak_factory_; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 } // namespace content | 188 } // namespace content |
| 189 | 189 |
| 190 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ | 190 #endif // CONTENT_BROWSER_RENDERER_HOST_BROWSER_COMPOSITOR_VIEW_MAC_H_ |
| OLD | NEW |