2013-11-08 04:50:39 +00: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 04:18:28 +00:00
|
|
|
static gfx::GradientStops*
|
2014-09-29 13:15:19 +00:00
|
|
|
GetGradientStops(const gfx::DrawTarget *aDT,
|
2014-08-29 04:18:28 +00:00
|
|
|
nsTArray<gfx::GradientStop>& aStops,
|
|
|
|
gfx::ExtendMode aExtend);
|
|
|
|
|
2016-01-05 10:08:56 +00:00
|
|
|
static already_AddRefed<gfx::GradientStops>
|
2014-09-29 13:15:19 +00:00
|
|
|
GetOrCreateGradientStops(const gfx::DrawTarget *aDT,
|
2014-08-29 04:18:28 +00:00
|
|
|
nsTArray<gfx::GradientStop>& aStops,
|
|
|
|
gfx::ExtendMode aExtend);
|
|
|
|
|
2014-09-04 17:28:43 +00:00
|
|
|
static void PurgeAllCaches();
|
2014-08-29 04:18:28 +00:00
|
|
|
static void Shutdown();
|
2013-11-08 04:50:39 +00:00
|
|
|
};
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
2013-11-08 04:50:39 +00:00
|
|
|
|
|
|
|
#endif
|