Bug 1777562 [wpt PR 34663] - [FedCM] Rename FederatedCredential to IdentityCredential...
[gecko.git] / widget / gtk / CompositorWidgetChild.cpp
blobb7908a43d4e76f944a81eb9e000ccbd21f9e9ff5
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "CompositorWidgetChild.h"
7 #include "mozilla/Unused.h"
8 #include "gfxPlatform.h"
10 namespace mozilla {
11 namespace widget {
13 CompositorWidgetChild::CompositorWidgetChild(
14 RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
15 RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver,
16 const CompositorWidgetInitData&)
17 : mVsyncDispatcher(aVsyncDispatcher), mVsyncObserver(aVsyncObserver) {
18 MOZ_ASSERT(XRE_IsParentProcess());
19 MOZ_ASSERT(!gfxPlatform::IsHeadless());
22 CompositorWidgetChild::~CompositorWidgetChild() = default;
24 bool CompositorWidgetChild::Initialize() { return true; }
26 mozilla::ipc::IPCResult CompositorWidgetChild::RecvObserveVsync() {
27 mVsyncDispatcher->SetCompositorVsyncObserver(mVsyncObserver);
28 return IPC_OK();
31 mozilla::ipc::IPCResult CompositorWidgetChild::RecvUnobserveVsync() {
32 mVsyncDispatcher->SetCompositorVsyncObserver(nullptr);
33 return IPC_OK();
36 void CompositorWidgetChild::NotifyClientSizeChanged(
37 const LayoutDeviceIntSize& aClientSize) {
38 Unused << SendNotifyClientSizeChanged(aClientSize);
41 void CompositorWidgetChild::DisableRendering() {
42 Unused << SendDisableRendering();
45 void CompositorWidgetChild::EnableRendering(const uintptr_t aXWindow,
46 const bool aShaped) {
47 Unused << SendEnableRendering(aXWindow, aShaped);
50 } // namespace widget
51 } // namespace mozilla