зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322079 - Add WebRenderBorderLayer. r=mattwoodrow
MozReview-Commit-ID: E6wHBxXX7Zp
This commit is contained in:
Родитель
771c054cf2
Коммит
f0225346c8
|
@ -378,6 +378,7 @@ UNIFIED_SOURCES += [
|
|||
'RenderTrace.cpp',
|
||||
'RotatedBuffer.cpp',
|
||||
'TextureWrapperImage.cpp',
|
||||
'wr/WebRenderBorderLayer.cpp',
|
||||
'wr/WebRenderBridgeChild.cpp',
|
||||
'wr/WebRenderBridgeParent.cpp',
|
||||
'wr/WebRenderCanvasLayer.cpp',
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/* -*- 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/. */
|
||||
|
||||
#include "WebRenderBorderLayer.h"
|
||||
|
||||
#include "LayersLogging.h"
|
||||
#include "mozilla/gfx/webrender.h"
|
||||
#include "mozilla/layers/WebRenderBridgeChild.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
void
|
||||
WebRenderBorderLayer::RenderLayer()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
|
@ -0,0 +1,38 @@
|
|||
/* -*- 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_WEBRENDERBORDERLAYER_H
|
||||
#define GFX_WEBRENDERBORDERLAYER_H
|
||||
|
||||
#include "Layers.h"
|
||||
#include "WebRenderLayerManager.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
class WebRenderBorderLayer : public WebRenderLayer,
|
||||
public BorderLayer {
|
||||
public:
|
||||
explicit WebRenderBorderLayer(WebRenderLayerManager* aLayerManager)
|
||||
: BorderLayer(aLayerManager, static_cast<WebRenderLayer*>(this))
|
||||
{
|
||||
MOZ_COUNT_CTOR(WebRenderBorderLayer);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~WebRenderBorderLayer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(WebRenderBorderLayer);
|
||||
}
|
||||
|
||||
public:
|
||||
Layer* GetLayer() override { return this; }
|
||||
void RenderLayer() override;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // GFX_WEBRENDERBORDERLAYER_H
|
|
@ -16,6 +16,7 @@
|
|||
#include "mozilla/widget/PlatformWidgetTypes.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "TreeTraversal.h"
|
||||
#include "WebRenderBorderLayer.h"
|
||||
#include "WebRenderCanvasLayer.h"
|
||||
#include "WebRenderColorLayer.h"
|
||||
#include "WebRenderContainerLayer.h"
|
||||
|
@ -472,5 +473,11 @@ WebRenderLayerManager::CreateTextLayer()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
already_AddRefed<BorderLayer>
|
||||
WebRenderLayerManager::CreateBorderLayer()
|
||||
{
|
||||
return MakeAndAddRef<WebRenderBorderLayer>(this);
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
virtual already_AddRefed<ColorLayer> CreateColorLayer() override;
|
||||
virtual already_AddRefed<RefLayer> CreateRefLayer() override;
|
||||
virtual already_AddRefed<TextLayer> CreateTextLayer() override;
|
||||
virtual already_AddRefed<BorderLayer> CreateBorderLayer() override;
|
||||
|
||||
virtual bool NeedsWidgetInvalidation() override { return true; }
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче