tor-browser

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

RenderRootTypes.h (2092B)


      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 
      7 #ifndef GFX_RENDERROOTTYPES_H
      8 #define GFX_RENDERROOTTYPES_H
      9 
     10 #include "mozilla/webrender/WebRenderAPI.h"
     11 #include "mozilla/webrender/WebRenderTypes.h"
     12 #include "mozilla/layers/WebRenderMessages.h"
     13 #include "mozilla/layers/WebRenderScrollData.h"
     14 
     15 namespace mozilla {
     16 
     17 namespace layers {
     18 
     19 struct DisplayListData {
     20  wr::IdNamespace mIdNamespace;
     21  LayoutDeviceRect mRect;
     22  nsTArray<WebRenderParentCommand> mCommands;
     23  Maybe<mozilla::ipc::ByteBuf> mDLItems;
     24  Maybe<mozilla::ipc::ByteBuf> mDLCache;
     25  Maybe<mozilla::ipc::ByteBuf> mDLSpatialTree;
     26  wr::BuiltDisplayListDescriptor mDLDesc;
     27  nsTArray<OpUpdateResource> mResourceUpdates;
     28  nsTArray<RefCountedShmem> mSmallShmems;
     29  nsTArray<mozilla::ipc::Shmem> mLargeShmems;
     30  Maybe<WebRenderScrollData> mScrollData;
     31 };
     32 
     33 struct TransactionData {
     34  wr::IdNamespace mIdNamespace;
     35  nsTArray<WebRenderParentCommand> mCommands;
     36  nsTArray<OpUpdateResource> mResourceUpdates;
     37  nsTArray<RefCountedShmem> mSmallShmems;
     38  nsTArray<mozilla::ipc::Shmem> mLargeShmems;
     39  ScrollUpdatesMap mScrollUpdates;
     40  uint32_t mPaintSequenceNumber;
     41 };
     42 
     43 typedef Maybe<TransactionData> MaybeTransactionData;
     44 
     45 }  // namespace layers
     46 }  // namespace mozilla
     47 
     48 namespace IPC {
     49 
     50 template <>
     51 struct ParamTraits<mozilla::layers::DisplayListData> {
     52  typedef mozilla::layers::DisplayListData paramType;
     53 
     54  static void Write(MessageWriter* aWriter, paramType&& aParam);
     55 
     56  static bool Read(MessageReader* aReader, paramType* aResult);
     57 };
     58 
     59 template <>
     60 struct ParamTraits<mozilla::layers::TransactionData> {
     61  typedef mozilla::layers::TransactionData paramType;
     62 
     63  static void Write(MessageWriter* aWriter, paramType&& aParam);
     64 
     65  static bool Read(MessageReader* aReader, paramType* aResult);
     66 };
     67 
     68 }  // namespace IPC
     69 
     70 #endif /* GFX_RENDERROOTTYPES_H */