Bug 1396489 - Part 1. Change gfxContext::GetClipExtents to a const function. r=mstange

MozReview-Commit-ID: ANFDAxeL5G0

--HG--
extra : rebase_source : d2a427228484378606205b7ee7a35105fbf840ab
This commit is contained in:
cku 2017-09-04 12:56:13 +08:00
Родитель a40c88e159
Коммит ac69fce70f
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -595,7 +595,7 @@ gfxContext::PopClip()
}
gfxRect
gfxContext::GetClipExtents()
gfxContext::GetClipExtents() const
{
Rect rect = GetAzureDeviceSpaceClipBounds();
@ -1062,13 +1062,13 @@ gfxContext::ChangeTransform(const Matrix &aNewMatrix, bool aUpdatePatternTransfo
}
Rect
gfxContext::GetAzureDeviceSpaceClipBounds()
gfxContext::GetAzureDeviceSpaceClipBounds() const
{
Rect rect(CurrentState().deviceOffset.x, CurrentState().deviceOffset.y,
Float(mDT->GetSize().width), Float(mDT->GetSize().height));
for (unsigned int i = 0; i < mStateStack.Length(); i++) {
for (unsigned int c = 0; c < mStateStack[i].pushedClips.Length(); c++) {
AzureState::PushedClip &clip = mStateStack[i].pushedClips[c];
const AzureState::PushedClip &clip = mStateStack[i].pushedClips[c];
if (clip.path) {
Rect bounds = clip.path->GetBounds(clip.transform);
rect.IntersectRect(rect, bounds);

Просмотреть файл

@ -381,7 +381,7 @@ public:
* This will return the current bounds of the clip region in user
* space.
*/
gfxRect GetClipExtents();
gfxRect GetClipExtents() const;
/**
* Returns true if the given rectangle is fully contained in the current clip.
@ -519,7 +519,7 @@ private:
void FillAzure(const Pattern& aPattern, mozilla::gfx::Float aOpacity);
CompositionOp GetOp();
void ChangeTransform(const mozilla::gfx::Matrix &aNewMatrix, bool aUpdatePatternTransform = true);
Rect GetAzureDeviceSpaceClipBounds();
Rect GetAzureDeviceSpaceClipBounds() const;
Matrix GetDeviceTransform() const;
Matrix GetDTTransform() const;