From 0a72e088cb9964cdb73e1d7da2e0825cddd069ce Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Wed, 3 Sep 2014 09:20:56 +1200 Subject: [PATCH] Bug 1059033 - Part 4: Avoid recreating DrawTargets too often. r=nical --HG-- extra : rebase_source : 8413ce440168235196e44f1a166cfff07a4f842f --- gfx/layers/client/TextureClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 3c26b75f2284..37edeb7ef596 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -689,6 +689,7 @@ BufferTextureClient::BorrowDrawTarget() MOZ_ASSERT(mLocked, "BorrowDrawTarget should be called on locked textures only"); if (mDrawTarget) { + mDrawTarget->SetTransform(Matrix()); return mDrawTarget; } @@ -738,7 +739,6 @@ BufferTextureClient::Unlock() } mDrawTarget->Flush(); - mDrawTarget = nullptr; } bool