mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1400407 - Part 2: Cleanup DOM Canvas mirroring dead code,r=jgilbert
- Refactored out Canvas layer mirror specialization, no longer needed as we are no longer implementing a TextureForwarder to submit VR frames. MozReview-Commit-ID: ArZO6M9kNLg --HG-- extra : rebase_source : 2447bfb61b6575f0c6bdaf35ecd4656e7cfb762f
This commit is contained in:
parent
07bf2f8968
commit
7f6e715fdf
@ -6095,14 +6095,8 @@ void CanvasRenderingContext2D::RemoveDrawObserver()
|
||||
already_AddRefed<Layer>
|
||||
CanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
Layer* aOldLayer,
|
||||
LayerManager* aManager,
|
||||
bool aMirror /* = false */)
|
||||
LayerManager* aManager)
|
||||
{
|
||||
if (aMirror) {
|
||||
// Not supported for CanvasRenderingContext2D
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mOpaque || mIsSkiaGL) {
|
||||
// If we're opaque then make sure we have a surface so we paint black
|
||||
// instead of transparent.
|
||||
@ -6173,7 +6167,7 @@ CanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
canvasLayer->SetUserData(&g2DContextLayerUserData, userData);
|
||||
|
||||
CanvasRenderer* canvasRenderer = canvasLayer->CreateOrGetCanvasRenderer();
|
||||
InitializeCanvasRenderer(aBuilder, canvasRenderer, aMirror);
|
||||
InitializeCanvasRenderer(aBuilder, canvasRenderer);
|
||||
uint32_t flags = mOpaque ? Layer::CONTENT_OPAQUE : 0;
|
||||
canvasLayer->SetContentFlags(flags);
|
||||
|
||||
@ -6184,8 +6178,7 @@ CanvasRenderingContext2D::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
bool
|
||||
CanvasRenderingContext2D::InitializeCanvasRenderer(nsDisplayListBuilder* aBuilder,
|
||||
CanvasRenderer* aRenderer,
|
||||
bool aMirror)
|
||||
CanvasRenderer* aRenderer)
|
||||
{
|
||||
CanvasInitializeData data;
|
||||
data.mSize = GetSize();
|
||||
|
@ -466,11 +466,9 @@ public:
|
||||
NS_IMETHOD Reset() override;
|
||||
already_AddRefed<Layer> GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
Layer* aOldLayer,
|
||||
LayerManager* aManager,
|
||||
bool aMirror = false) override;
|
||||
LayerManager* aManager) override;
|
||||
bool InitializeCanvasRenderer(nsDisplayListBuilder* aBuilder,
|
||||
CanvasRenderer* aRenderer,
|
||||
bool aMirror = false) override;
|
||||
CanvasRenderer* aRenderer) override;
|
||||
virtual bool ShouldForceInactiveLayer(LayerManager* aManager) override;
|
||||
void MarkContextClean() override;
|
||||
void MarkContextCleanForFrameCapture() override;
|
||||
|
@ -226,14 +226,8 @@ ImageBitmapRenderingContext::Reset()
|
||||
already_AddRefed<Layer>
|
||||
ImageBitmapRenderingContext::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
Layer* aOldLayer,
|
||||
LayerManager* aManager,
|
||||
bool aMirror /* = false */)
|
||||
LayerManager* aManager)
|
||||
{
|
||||
if (aMirror) {
|
||||
// Not supported for ImageBitmapRenderingContext
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!mImage) {
|
||||
// No DidTransactionCallback will be received, so mark the context clean
|
||||
// now so future invalidations will be dispatched.
|
||||
|
@ -71,8 +71,7 @@ public:
|
||||
NS_IMETHOD Reset() override;
|
||||
virtual already_AddRefed<Layer> GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
Layer* aOldLayer,
|
||||
LayerManager* aManager,
|
||||
bool aMirror = false) override;
|
||||
LayerManager* aManager) override;
|
||||
virtual void MarkContextClean() override;
|
||||
|
||||
NS_IMETHOD Redraw(const gfxRect& aDirty) override;
|
||||
|
@ -433,12 +433,10 @@ public:
|
||||
|
||||
already_AddRefed<Layer>
|
||||
GetCanvasLayer(nsDisplayListBuilder* builder, Layer* oldLayer,
|
||||
LayerManager* manager,
|
||||
bool aMirror = false) override;
|
||||
LayerManager* manager) override;
|
||||
bool
|
||||
InitializeCanvasRenderer(nsDisplayListBuilder* aBuilder,
|
||||
CanvasRenderer* aRenderer,
|
||||
bool aMirror = false) override;
|
||||
CanvasRenderer* aRenderer) override;
|
||||
|
||||
// Note that 'clean' here refers to its invalidation state, not the
|
||||
// contents of the buffer.
|
||||
|
@ -139,11 +139,9 @@ public:
|
||||
// one for the given layer manager if not available.
|
||||
virtual already_AddRefed<Layer> GetCanvasLayer(nsDisplayListBuilder* builder,
|
||||
Layer *oldLayer,
|
||||
LayerManager *manager,
|
||||
bool aMirror = false) = 0;
|
||||
LayerManager *manager) = 0;
|
||||
virtual bool InitializeCanvasRenderer(nsDisplayListBuilder* aBuilder,
|
||||
CanvasRenderer* aRenderer,
|
||||
bool aMirror = false) { return true; }
|
||||
CanvasRenderer* aRenderer) { return true; }
|
||||
|
||||
// Return true if the canvas should be forced to be "inactive" to ensure
|
||||
// it can be drawn to the screen even if it's too large to be blitted by
|
||||
|
Loading…
Reference in New Issue
Block a user