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 <mfoltz@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40563}
diff --git a/modules/desktop_capture/mac/desktop_frame_cgimage.h b/modules/desktop_capture/mac/desktop_frame_cgimage.h
index d6279f9..fa1a650 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 @@
   static std::unique_ptr<DesktopFrameCGImage> CreateForWindow(
       CGWindowID window_id);
 
+  static std::unique_ptr<DesktopFrameCGImage> CreateFromCGImage(
+      rtc::ScopedCFTypeRef<CGImageRef> cg_image);
+
   ~DesktopFrameCGImage() override;
 
   DesktopFrameCGImage(const DesktopFrameCGImage&) = delete;
   DesktopFrameCGImage& operator=(const DesktopFrameCGImage&) = delete;
 
  private:
-  static std::unique_ptr<DesktopFrameCGImage> CreateFromCGImage(
-      rtc::ScopedCFTypeRef<CGImageRef> cg_image);
-
   // This constructor expects `cg_image` to hold a non-null CGImageRef.
   DesktopFrameCGImage(DesktopSize size,
                       int stride,