mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1213491 - Change CanvasRenderingContext2D::ContextState::clipsPushed to an nsTArray. r=nical
This commit is contained in:
parent
42685fa873
commit
b36bf70608
@ -1235,7 +1235,7 @@ bool CanvasRenderingContext2D::SwitchRenderingMode(RenderingMode aRenderingMode)
|
||||
mTarget->DrawSurface(snapshot, r, r);
|
||||
|
||||
// Restore the clips and transform
|
||||
for (uint32_t i = 0; i < CurrentState().clipsPushed.size(); i++) {
|
||||
for (uint32_t i = 0; i < CurrentState().clipsPushed.Length(); i++) {
|
||||
mTarget->PushClip(CurrentState().clipsPushed[i]);
|
||||
}
|
||||
|
||||
@ -1719,7 +1719,7 @@ CanvasRenderingContext2D::Restore()
|
||||
|
||||
TransformWillUpdate();
|
||||
|
||||
for (uint32_t i = 0; i < CurrentState().clipsPushed.size(); i++) {
|
||||
for (uint32_t i = 0; i < CurrentState().clipsPushed.Length(); i++) {
|
||||
mTarget->PopClip();
|
||||
}
|
||||
|
||||
@ -2864,7 +2864,7 @@ CanvasRenderingContext2D::Clip(const CanvasWindingRule& winding)
|
||||
}
|
||||
|
||||
mTarget->PushClip(mPath);
|
||||
CurrentState().clipsPushed.push_back(mPath);
|
||||
CurrentState().clipsPushed.AppendElement(mPath);
|
||||
}
|
||||
|
||||
void
|
||||
@ -2879,7 +2879,7 @@ CanvasRenderingContext2D::Clip(const CanvasPath& path, const CanvasWindingRule&
|
||||
}
|
||||
|
||||
mTarget->PushClip(gfxpath);
|
||||
CurrentState().clipsPushed.push_back(gfxpath);
|
||||
CurrentState().clipsPushed.AppendElement(gfxpath);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -984,7 +984,7 @@ protected:
|
||||
return std::min(SIGMA_MAX, shadowBlur / 2.0f);
|
||||
}
|
||||
|
||||
std::vector<mozilla::RefPtr<mozilla::gfx::Path> > clipsPushed;
|
||||
nsTArray<mozilla::RefPtr<mozilla::gfx::Path> > clipsPushed;
|
||||
|
||||
nsRefPtr<gfxFontGroup> fontGroup;
|
||||
nsCOMPtr<nsIAtom> fontLanguage;
|
||||
|
Loading…
Reference in New Issue
Block a user