/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_layers_NativeLayerRootRemoteMacSnapshotter_h #define mozilla_layers_NativeLayerRootRemoteMacSnapshotter_h #include "mozilla/RefPtr.h" #include "mozilla/UniquePtr.h" #include "mozilla/gfx/Point.h" #include "mozilla/layers/NativeLayer.h" #include "mozilla/layers/ScreenshotGrabber.h" namespace mozilla { namespace layers { class NativeLayerRootRemoteMacChild; class NativeLayerRootRemoteMacSnapshotter : public NativeLayerRootSnapshotter { public: static UniquePtr Create( NativeLayerRootRemoteMacChild* aLayerRoot); bool ReadbackPixels(const gfx::IntSize& aReadbackSize, gfx::SurfaceFormat aReadbackFormat, const Range& aReadbackBuffer); already_AddRefed GetWindowContents( const gfx::IntSize& aSize); already_AddRefed CreateDownscaleTarget( const gfx::IntSize& aSize); already_AddRefed CreateAsyncReadbackBuffer(const gfx::IntSize& aSize); protected: explicit NativeLayerRootRemoteMacSnapshotter( NativeLayerRootRemoteMacChild* aLayerRoot); RefPtr mLayerRoot; }; } // namespace layers } // namespace mozilla #endif // mozilla_layers_NativeLayerRootRemoteMacSnapshotter_h