Bug 1556473. Change DrawTargetD2D1::GetDeviceSpaceClipRect to always give back useful values. r=bas

Even if we have no clips applied it's valuable to give back the surface size.

Differential Revision: https://phabricator.services.mozilla.com/D33535

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Muizelaar 2019-06-08 03:59:19 +00:00
parent e565bbcea6
commit 73d47b32e2

View File

@ -1673,12 +1673,13 @@ static D2D1_RECT_F IntersectRect(const D2D1_RECT_F& aRect1,
bool DrawTargetD2D1::GetDeviceSpaceClipRect(D2D1_RECT_F& aClipRect,
bool& aIsPixelAligned) {
aIsPixelAligned = true;
aClipRect = D2D1::RectF(0, 0, mSize.width, mSize.height);
if (!CurrentLayer().mPushedClips.size()) {
return false;
}
aIsPixelAligned = true;
aClipRect = D2D1::RectF(0, 0, mSize.width, mSize.height);
for (auto iter = CurrentLayer().mPushedClips.begin();
iter != CurrentLayer().mPushedClips.end(); iter++) {
if (iter->mGeometry) {