зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1477471 - Implement PushLayerWithBlend for DrawTargetTiled. r=jrmuizel
This commit is contained in:
Родитель
886f9bb742
Коммит
3dfe60b882
|
@ -347,6 +347,29 @@ DrawTargetTiled::PushLayer(bool aOpaque, Float aOpacity, SourceSurface* aMask,
|
|||
SetPermitSubpixelAA(aOpaque);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetTiled::PushLayerWithBlend(bool aOpaque, Float aOpacity,
|
||||
SourceSurface* aMask,
|
||||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds,
|
||||
bool aCopyBackground,
|
||||
CompositionOp aOp)
|
||||
{
|
||||
// XXX - not sure this is what we want or whether we want to continue drawing to a larger
|
||||
// intermediate surface, that would require tweaking the code in here a little though.
|
||||
for (size_t i = 0; i < mTiles.size(); i++) {
|
||||
if (!mTiles[i].mClippedOut) {
|
||||
IntRect bounds = aBounds;
|
||||
bounds.MoveBy(-mTiles[i].mTileOrigin);
|
||||
mTiles[i].mDrawTarget->PushLayerWithBlend(aOpaque, aOpacity, aMask, aMaskTransform, bounds, aCopyBackground, aOp);
|
||||
}
|
||||
}
|
||||
|
||||
PushedLayer layer(GetPermitSubpixelAA());
|
||||
mPushedLayers.push_back(layer);
|
||||
SetPermitSubpixelAA(aOpaque);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetTiled::PopLayer()
|
||||
{
|
||||
|
|
|
@ -116,6 +116,12 @@ public:
|
|||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds = IntRect(),
|
||||
bool aCopyBackground = false) override;
|
||||
virtual void PushLayerWithBlend(bool aOpaque, Float aOpacity,
|
||||
SourceSurface* aMask,
|
||||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds = IntRect(),
|
||||
bool aCopyBackground = false,
|
||||
CompositionOp = CompositionOp::OP_OVER) override;
|
||||
virtual void PopLayer() override;
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче