2013-11-08 08:50:39 +04:00
|
|
|
|
|
|
|
/* -*- Mode: C++; tab-width: 2; 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/. */
|
|
|
|
|
|
|
|
#ifndef GFX_GRADIENT_CACHE_H
|
|
|
|
#define GFX_GRADIENT_CACHE_H
|
|
|
|
|
|
|
|
#include "nsTArray.h"
|
|
|
|
#include "gfxPattern.h"
|
|
|
|
#include "mozilla/gfx/2D.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
|
|
|
class gfxGradientCache {
|
|
|
|
public:
|
2014-08-29 08:18:28 +04:00
|
|
|
static gfx::GradientStops*
|
2014-09-29 17:15:19 +04:00
|
|
|
GetGradientStops(const gfx::DrawTarget *aDT,
|
2014-08-29 08:18:28 +04:00
|
|
|
nsTArray<gfx::GradientStop>& aStops,
|
|
|
|
gfx::ExtendMode aExtend);
|
|
|
|
|
2016-01-05 13:08:56 +03:00
|
|
|
static already_AddRefed<gfx::GradientStops>
|
2014-09-29 17:15:19 +04:00
|
|
|
GetOrCreateGradientStops(const gfx::DrawTarget *aDT,
|
2014-08-29 08:18:28 +04:00
|
|
|
nsTArray<gfx::GradientStop>& aStops,
|
|
|
|
gfx::ExtendMode aExtend);
|
|
|
|
|
2014-09-04 21:28:43 +04:00
|
|
|
static void PurgeAllCaches();
|
2014-08-29 08:18:28 +04:00
|
|
|
static void Shutdown();
|
2013-11-08 08:50:39 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
2013-11-08 08:50:39 +04:00
|
|
|
|
|
|
|
#endif
|