2017-02-15 02:06:50 +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 GFX_WEBRENDERDISPLAYITEMLAYER_H
|
|
|
|
#define GFX_WEBRENDERDISPLAYITEMLAYER_H
|
|
|
|
|
|
|
|
#include "Layers.h"
|
|
|
|
#include "WebRenderLayerManager.h"
|
2017-02-20 05:22:57 +03:00
|
|
|
#include "mozilla/layers/ImageClient.h"
|
2017-02-15 02:06:50 +03:00
|
|
|
#include "mozilla/layers/PWebRenderBridgeChild.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
class WebRenderDisplayItemLayer : public WebRenderLayer,
|
|
|
|
public DisplayItemLayer {
|
|
|
|
public:
|
|
|
|
explicit WebRenderDisplayItemLayer(WebRenderLayerManager* aLayerManager)
|
|
|
|
: DisplayItemLayer(aLayerManager, static_cast<WebRenderLayer*>(this))
|
2017-02-20 05:22:57 +03:00
|
|
|
, mExternalImageId(0)
|
2017-02-15 02:06:50 +03:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(WebRenderDisplayItemLayer);
|
|
|
|
}
|
|
|
|
|
2017-02-20 05:22:57 +03:00
|
|
|
uint64_t SendImageContainer(ImageContainer* aContainer);
|
|
|
|
|
2017-02-15 02:06:50 +03:00
|
|
|
protected:
|
|
|
|
virtual ~WebRenderDisplayItemLayer()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(WebRenderDisplayItemLayer);
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
Layer* GetLayer() override { return this; }
|
2017-03-03 18:45:29 +03:00
|
|
|
void RenderLayer(wr::DisplayListBuilder& aBuilder) override;
|
2017-02-15 02:06:50 +03:00
|
|
|
|
|
|
|
private:
|
2017-03-03 18:45:29 +03:00
|
|
|
wr::BuiltDisplayList mBuiltDisplayList;
|
2017-03-03 00:33:03 +03:00
|
|
|
nsTArray<WebRenderParentCommand> mParentCommands;
|
2017-02-20 05:22:57 +03:00
|
|
|
RefPtr<ImageClient> mImageClient;
|
|
|
|
RefPtr<ImageContainer> mImageContainer;
|
|
|
|
uint64_t mExternalImageId;
|
|
|
|
|
2017-02-15 02:06:50 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2017-03-03 00:33:03 +03:00
|
|
|
#endif // GFX_WEBRENDERDisplayItemLayer_H
|