Skip to content

Commit

Permalink
Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwoodrow committed Aug 25, 2021
1 parent 557cca7 commit a3594e0
Show file tree
Hide file tree
Showing 32 changed files with 12 additions and 2,532 deletions.
2 changes: 0 additions & 2 deletions gfx/layers/LayerManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class DrawTarget;
namespace layers {

class AsyncPanZoomController;
class BasicLayerManager;
class ClientLayerManager;
class HostLayerManager;
class Layer;
Expand Down Expand Up @@ -165,7 +164,6 @@ class LayerManager : public WindowRenderer {

virtual LayerManagerComposite* AsLayerManagerComposite() { return nullptr; }

virtual BasicLayerManager* AsBasicLayerManager() { return nullptr; }
virtual HostLayerManager* AsHostLayerManager() { return nullptr; }

virtual WebRenderLayerManager* AsWebRenderLayerManager() { return nullptr; }
Expand Down
34 changes: 1 addition & 33 deletions gfx/layers/RotatedBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
#include <algorithm> // for max
#include <utility> // for Move

#include "BasicImplData.h" // for BasicImplData
#include "BasicLayersImpl.h" // for ToData
#include "Layers.h" // for PaintedLayer, Layer, etc
#include "Layers.h" // for PaintedLayer, Layer, etc
#include "gfx2DGlue.h"
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxUtils.h" // for gfxUtils
Expand Down Expand Up @@ -203,36 +201,6 @@ static bool IsClippingCheap(gfx::DrawTarget* aTarget,
aRegion.GetNumRects() <= 1;
}

void RotatedBuffer::DrawTo(PaintedLayer* aLayer, DrawTarget* aTarget,
float aOpacity, CompositionOp aOp,
SourceSurface* aMask, const Matrix* aMaskTransform) {
bool clipped = false;

// If the entire buffer is valid, we can just draw the whole thing,
// no need to clip. But we'll still clip if clipping is cheap ---
// that might let us copy a smaller region of the buffer.
// Also clip to the visible region if we're told to.
if (!aLayer->GetValidRegion().Contains(BufferRect()) ||
(ToData(aLayer)->GetClipToVisibleRegion() &&
!aLayer->GetVisibleRegion().ToUnknownRegion().Contains(BufferRect())) ||
IsClippingCheap(aTarget,
aLayer->GetLocalVisibleRegion().ToUnknownRegion())) {
// We don't want to draw invalid stuff, so we need to clip. Might as
// well clip to the smallest area possible --- the visible region.
// Bug 599189 if there is a non-integer-translation transform in aTarget,
// we might sample pixels outside GetLocalVisibleRegion(), which is wrong
// and may cause gray lines.
gfxUtils::ClipToRegion(aTarget,
aLayer->GetLocalVisibleRegion().ToUnknownRegion());
clipped = true;
}

DrawBufferWithRotation(aTarget, aOpacity, aOp, aMask, aMaskTransform);
if (clipped) {
aTarget->PopClip();
}
}

void RotatedBuffer::UpdateDestinationFrom(const RotatedBuffer& aSource,
const gfx::IntRect& aUpdateRect) {
DrawIterator iter;
Expand Down
9 changes: 0 additions & 9 deletions gfx/layers/RotatedBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ class RotatedBuffer : public BorrowDrawTarget {
gfx::SourceSurface* aMask = nullptr,
const gfx::Matrix* aMaskTransform = nullptr) const;

/**
* Complete the drawing operation. The region to draw must have been
* drawn before this is called. The contents of the buffer are drawn
* to aTarget.
*/
void DrawTo(PaintedLayer* aLayer, gfx::DrawTarget* aTarget, float aOpacity,
gfx::CompositionOp aOp, gfx::SourceSurface* aMask,
const gfx::Matrix* aMaskTransform);

/**
* Update the specified region of this rotated buffer with the contents
* of a source rotated buffer.
Expand Down
77 changes: 0 additions & 77 deletions gfx/layers/basic/BasicCanvasLayer.cpp

This file was deleted.

44 changes: 0 additions & 44 deletions gfx/layers/basic/BasicCanvasLayer.h

This file was deleted.

75 changes: 0 additions & 75 deletions gfx/layers/basic/BasicColorLayer.cpp

This file was deleted.

Loading

0 comments on commit a3594e0

Please sign in to comment.