Bug 1213491 - Change CanvasRenderingContext2D::ContextState::clipsPushed to an nsTArray. r=nical

This commit is contained in:
Jed Davis 2015-10-09 16:20:00 +02:00
parent 42685fa873
commit b36bf70608
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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;