Bug 1029211 - Get rid of a couple more Thebes backed gfxContexts by using gfxUtils::ClearThebesSurface instead. r=mattwoodrow

--HG--
extra : rebase_source : cc75965e0ba908b84a592e337af0429ddb9cc846
This commit is contained in:
Jonathan Watt 2014-06-24 10:02:10 +01:00
parent 156004b042
commit fe47bc40e9
2 changed files with 5 additions and 6 deletions

View File

@ -14,6 +14,8 @@ using mozilla::DefaultXDisplay;
#endif
#include "nsPluginInstanceOwner.h"
#include "gfxUtils.h"
#include "nsIRunnable.h"
#include "nsContentUtils.h"
#include "nsRect.h"
@ -2437,9 +2439,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext,
}
// Clears buffer. I think this is needed.
nsRefPtr<gfxContext> ctx = new gfxContext(pluginSurface);
ctx->SetOperator(gfxContext::OPERATOR_CLEAR);
ctx->Paint();
gfxUtils::ClearThebesSurface(pluginSurface);
ANPEvent event;
event.inSize = sizeof(ANPEvent);

View File

@ -5,6 +5,7 @@
#include "gfxQtNativeRenderer.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "gfxXlibSurface.h"
nsresult
@ -32,9 +33,7 @@ gfxQtNativeRenderer::Draw(gfxContext* ctx, nsIntSize size,
gfxIntSize(size.width, size.height));
if (!isOpaque) {
nsRefPtr<gfxContext> tempCtx = new gfxContext(xsurf);
tempCtx->SetOperator(gfxContext::OPERATOR_CLEAR);
tempCtx->Paint();
gfxUtils::ClearThebesSurface(xsurf);
}
nsresult rv = DrawWithXlib(xsurf->CairoSurface(), nsIntPoint(0, 0), nullptr, 0);