2016-07-01 11:15:16 +03:00
|
|
|
/* -*- 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 widget_windows_CompositorWidgetChild_h
|
|
|
|
#define widget_windows_CompositorWidgetChild_h
|
|
|
|
|
|
|
|
#include "WinCompositorWidget.h"
|
|
|
|
#include "mozilla/widget/PCompositorWidgetChild.h"
|
2016-07-19 21:56:07 +03:00
|
|
|
#include "mozilla/widget/CompositorWidgetVsyncObserver.h"
|
2016-07-01 11:15:16 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
2016-07-19 21:56:07 +03:00
|
|
|
class CompositorVsyncDispatcher;
|
|
|
|
|
2016-07-01 11:15:16 +03:00
|
|
|
namespace widget {
|
|
|
|
|
|
|
|
class CompositorWidgetChild final
|
|
|
|
: public PCompositorWidgetChild,
|
|
|
|
public CompositorWidgetDelegate
|
|
|
|
{
|
|
|
|
public:
|
2016-07-19 21:56:07 +03:00
|
|
|
CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
|
|
|
|
RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver);
|
2016-07-01 11:15:16 +03:00
|
|
|
~CompositorWidgetChild() override;
|
|
|
|
|
|
|
|
void EnterPresentLock() override;
|
|
|
|
void LeavePresentLock() override;
|
|
|
|
void OnDestroyWindow() override;
|
|
|
|
void UpdateTransparency(nsTransparencyMode aMode) override;
|
|
|
|
void ClearTransparentWindow() override;
|
|
|
|
HDC GetTransparentDC() const override;
|
2016-07-19 21:56:07 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvObserveVsync() override;
|
|
|
|
mozilla::ipc::IPCResult RecvUnobserveVsync() override;
|
2016-07-19 21:56:07 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher;
|
|
|
|
RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver;
|
2016-07-01 11:15:16 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace widget
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // widget_windows_CompositorWidgetChild_h
|