gfx/thebes/gfxGradientCache.h
author James Graham <james@hoppipolla.co.uk>
Fri, 05 Jun 2015 18:41:23 +0100
changeset 279947 8d8ecb2498c97549a2a68fffb5d75754ec67b93b
parent 232225 ece627b5e46a3b66e6af9df6017921789209a7d3
child 285938 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 1076787 - Add expectation data for running web-platform-tests on debug builds, r=Ms2ger


/* -*- 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:
    static gfx::GradientStops*
    GetGradientStops(const gfx::DrawTarget *aDT,
                     nsTArray<gfx::GradientStop>& aStops,
                     gfx::ExtendMode aExtend);

    static gfx::GradientStops*
    GetOrCreateGradientStops(const gfx::DrawTarget *aDT,
                             nsTArray<gfx::GradientStop>& aStops,
                             gfx::ExtendMode aExtend);

    static void PurgeAllCaches();
    static void Shutdown();
};

}
}

#endif