gfxGradientCache.h (805B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef GFX_GRADIENT_CACHE_H 7 #define GFX_GRADIENT_CACHE_H 8 9 #include "nsTArray.h" 10 #include "gfxPattern.h" 11 #include "mozilla/gfx/2D.h" 12 13 namespace mozilla { 14 namespace gfx { 15 16 class gfxGradientCache { 17 public: 18 static void Init(); 19 20 static already_AddRefed<gfx::GradientStops> GetOrCreateGradientStops( 21 const gfx::DrawTarget* aDT, nsTArray<gfx::GradientStop>& aStops, 22 gfx::ExtendMode aExtend); 23 24 static void PurgeAllCaches(); 25 static void Shutdown(); 26 }; 27 28 } // namespace gfx 29 } // namespace mozilla 30 31 #endif