mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 782786 - BasicCanvasLayer: avoid UpdateSurface of non-dirty canvases - r=BenWa
This commit is contained in:
parent
9948f9058a
commit
05e2fb7016
@ -120,6 +120,10 @@ BasicCanvasLayer::Initialize(const Data& aData)
|
|||||||
void
|
void
|
||||||
BasicCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
BasicCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
||||||
{
|
{
|
||||||
|
if (!mDirty)
|
||||||
|
return;
|
||||||
|
mDirty = false;
|
||||||
|
|
||||||
if (mDrawTarget) {
|
if (mDrawTarget) {
|
||||||
mDrawTarget->Flush();
|
mDrawTarget->Flush();
|
||||||
// TODO Fix me before turning accelerated quartz canvas by default
|
// TODO Fix me before turning accelerated quartz canvas by default
|
||||||
@ -133,10 +137,6 @@ BasicCanvasLayer::UpdateSurface(gfxASurface* aDestSurface, Layer* aMaskLayer)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mDirty)
|
|
||||||
return;
|
|
||||||
mDirty = false;
|
|
||||||
|
|
||||||
if (mGLContext) {
|
if (mGLContext) {
|
||||||
if (aDestSurface && aDestSurface->GetType() != gfxASurface::SurfaceTypeImage) {
|
if (aDestSurface && aDestSurface->GetType() != gfxASurface::SurfaceTypeImage) {
|
||||||
NS_ASSERTION(aDestSurface->GetType() == gfxASurface::SurfaceTypeImage,
|
NS_ASSERTION(aDestSurface->GetType() == gfxASurface::SurfaceTypeImage,
|
||||||
@ -393,6 +393,9 @@ BasicShadowableCanvasLayer::Paint(gfxContext* aContext, Layer* aMaskLayer)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mDirty)
|
||||||
|
return;
|
||||||
|
|
||||||
if (mGLContext &&
|
if (mGLContext &&
|
||||||
!mForceReadback &&
|
!mForceReadback &&
|
||||||
BasicManager()->GetParentBackendType() == mozilla::layers::LAYERS_OPENGL) {
|
BasicManager()->GetParentBackendType() == mozilla::layers::LAYERS_OPENGL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user