From 9c24a6882000e77e6f2280a48f327cd33bc8e5c0 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 19 Sep 2013 17:23:30 +1200 Subject: [PATCH] Bug 907926 - Try avoid having multiple path objects around since this is slow with DrawTargetCairo. r=Bas --- layout/base/FrameLayerBuilder.cpp | 1 + layout/base/nsCSSRenderingBorders.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index a72bcebda394..2ccf611a1795 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3282,6 +3282,7 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer, NS_ASSERTION(commonClipCount < 100, "Maybe you really do have more than a hundred clipping rounded rects, or maybe something has gone wrong."); currentClip.ApplyTo(aContext, presContext, commonClipCount); + aContext->NewPath(); } } diff --git a/layout/base/nsCSSRenderingBorders.cpp b/layout/base/nsCSSRenderingBorders.cpp index cbf458a4a2a6..b2fae9dd71c5 100644 --- a/layout/base/nsCSSRenderingBorders.cpp +++ b/layout/base/nsCSSRenderingBorders.cpp @@ -1579,6 +1579,8 @@ nsCSSBorderRenderer::DrawNoCompositeColorSolidBorderAzure() builder->LineTo(strokeEnd); RefPtr path = builder->Finish(); dt->Stroke(path, ColorPattern(Color::FromABGR(mBorderColors[i])), StrokeOptions(mBorderWidths[i])); + builder = nullptr; + path = nullptr; Pattern *pattern;