Line data Source code
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/. */
5 :
6 : #ifndef GFX_WEBRENDERDISPLAYITEMLAYER_H
7 : #define GFX_WEBRENDERDISPLAYITEMLAYER_H
8 :
9 : #include "Layers.h"
10 : #include "mozilla/layers/ImageClient.h"
11 : #include "mozilla/layers/PWebRenderBridgeChild.h"
12 : #include "mozilla/layers/WebRenderLayer.h"
13 : #include "mozilla/layers/WebRenderLayerManager.h"
14 : #include "mozilla/Maybe.h"
15 : #include "mozilla/webrender/WebRenderTypes.h"
16 :
17 : namespace mozilla {
18 : namespace layers {
19 :
20 : class WebRenderDisplayItemLayer : public WebRenderLayer,
21 : public DisplayItemLayer {
22 : public:
23 0 : explicit WebRenderDisplayItemLayer(WebRenderLayerManager* aLayerManager)
24 0 : : DisplayItemLayer(aLayerManager, static_cast<WebRenderLayer*>(this))
25 : {
26 0 : MOZ_COUNT_CTOR(WebRenderDisplayItemLayer);
27 0 : }
28 :
29 : protected:
30 : virtual ~WebRenderDisplayItemLayer();
31 :
32 : public:
33 0 : Layer* GetLayer() override { return this; }
34 : void RenderLayer(wr::DisplayListBuilder& aBuilder,
35 : const StackingContextHelper& aHelper) override;
36 :
37 : private:
38 : wr::BuiltDisplayList mBuiltDisplayList;
39 : nsTArray<WebRenderParentCommand> mParentCommands;
40 : };
41 :
42 : } // namespace layers
43 : } // namespace mozilla
44 :
45 : #endif // GFX_WEBRENDERDisplayItemLayer_H
|