From e5af52e1f2b10b177fda16c5310581e06629cf4c Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Thu, 10 Aug 2023 11:47:15 +0000 Subject: [PATCH] Make DesktopFrameCGImage::CreateFromCGImage() public CreateFromCGImage() is needed to be called directly when we move away from using the deprecated API that is used in CreateForWindow(). Bug: chromium:1471931 Change-Id: I28a2972a2a995103829fd9aff4bc1137a8b424b0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315324 Reviewed-by: Mark Foltz Commit-Queue: Mark Foltz Cr-Commit-Position: refs/heads/main@{#40563} --- modules/desktop_capture/mac/desktop_frame_cgimage.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/desktop_capture/mac/desktop_frame_cgimage.h b/modules/desktop_capture/mac/desktop_frame_cgimage.h index d6279f9b36..fa1a6502d9 100644 --- a/modules/desktop_capture/mac/desktop_frame_cgimage.h +++ b/modules/desktop_capture/mac/desktop_frame_cgimage.h @@ -20,7 +20,7 @@ namespace webrtc { -class DesktopFrameCGImage final : public DesktopFrame { +class RTC_EXPORT DesktopFrameCGImage final : public DesktopFrame { public: // Create an image containing a snapshot of the display at the time this is // being called. @@ -33,15 +33,15 @@ class DesktopFrameCGImage final : public DesktopFrame { static std::unique_ptr CreateForWindow( CGWindowID window_id); + static std::unique_ptr CreateFromCGImage( + rtc::ScopedCFTypeRef cg_image); + ~DesktopFrameCGImage() override; DesktopFrameCGImage(const DesktopFrameCGImage&) = delete; DesktopFrameCGImage& operator=(const DesktopFrameCGImage&) = delete; private: - static std::unique_ptr CreateFromCGImage( - rtc::ScopedCFTypeRef cg_image); - // This constructor expects `cg_image` to hold a non-null CGImageRef. DesktopFrameCGImage(DesktopSize size, int stride,