mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
25358a7059
commit
e8bd2a53a8
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user