зеркало из https://github.com/mozilla/gecko-dev.git
Bug 758531: Prevent leaking Azure Patterns' GradientStops. r=roc
This commit is contained in:
Родитель
ac8629b453
Коммит
d2bb6613fd
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -122,6 +122,11 @@ gfxPattern::GetMatrix() const
|
|||
Pattern*
|
||||
gfxPattern::GetPattern(DrawTarget *aTarget, Matrix *aPatternTransform)
|
||||
{
|
||||
if (mGfxPattern) {
|
||||
mGfxPattern->~Pattern();
|
||||
mGfxPattern = nsnull;
|
||||
}
|
||||
|
||||
if (!mPattern) {
|
||||
mGfxPattern = new (mSurfacePattern.addr())
|
||||
SurfacePattern(mSourceSurface, EXTEND_CLAMP, mTransform);
|
||||
|
|
Загрузка…
Ссылка в новой задаче