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:
Kearwood "Kip" Gilbert 2017-09-15 15:06:56 -07:00
parent 07bf2f8968
commit 7f6e715fdf
6 changed files with 11 additions and 31 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -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.

View File

@ -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