tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

OverlayInfo.h (1730B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 #ifndef _include_mozilla_gfx_ipc_OverlayInfo_h_
      7 #define _include_mozilla_gfx_ipc_OverlayInfo_h_
      8 
      9 namespace IPC {
     10 template <typename>
     11 struct ParamTraits;
     12 }  // namespace IPC
     13 
     14 namespace mozilla {
     15 namespace layers {
     16 
     17 enum class OverlaySupportType : uint8_t {
     18  None,
     19  Software,
     20  Direct,
     21  Scaling,
     22  MAX  // sentinel for the count of all effect types
     23 };
     24 
     25 struct OverlayInfo {
     26  // This constructor needed for IPDL purposes, don't use it anywhere else.
     27  OverlayInfo() = default;
     28 
     29  bool mSupportsOverlays = false;
     30  OverlaySupportType mNv12Overlay = OverlaySupportType::None;
     31  OverlaySupportType mYuy2Overlay = OverlaySupportType::None;
     32  OverlaySupportType mBgra8Overlay = OverlaySupportType::None;
     33  OverlaySupportType mRgb10a2Overlay = OverlaySupportType::None;
     34  OverlaySupportType mRgba16fOverlay = OverlaySupportType::None;
     35 
     36  bool mSupportsVpSuperResolution = false;
     37  bool mSupportsVpAutoHDR = false;
     38  bool mSupportsHDR = false;
     39 
     40  friend struct IPC::ParamTraits<OverlayInfo>;
     41 };
     42 
     43 struct SwapChainInfo {
     44  // This constructor needed for IPDL purposes, don't use it anywhere else.
     45  SwapChainInfo() = default;
     46 
     47  explicit SwapChainInfo(bool aTearingSupported)
     48      : mTearingSupported(aTearingSupported) {}
     49 
     50  bool mTearingSupported = false;
     51 
     52  friend struct IPC::ParamTraits<SwapChainInfo>;
     53 };
     54 
     55 }  // namespace layers
     56 }  // namespace mozilla
     57 
     58 #endif  // _include_mozilla_gfx_ipc_OverlayInfo_h_