SurfaceCacheUtils.h 896 B

1234567891011121314151617181920212223242526272829303132333435
  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. #ifndef mozilla_image_SurfaceCacheUtils_h
  6. #define mozilla_image_SurfaceCacheUtils_h
  7. /**
  8. * SurfaceCacheUtils provides an ImageLib-external API to interact with
  9. * ImageLib's SurfaceCache.
  10. */
  11. namespace mozilla {
  12. namespace image {
  13. class SurfaceCacheUtils
  14. {
  15. public:
  16. /**
  17. * Evicts all evictable entries from the surface cache.
  18. *
  19. * See the documentation for SurfaceCache::DiscardAll() for the details.
  20. */
  21. static void DiscardAll();
  22. private:
  23. virtual ~SurfaceCacheUtils() = 0; // Forbid instantiation.
  24. };
  25. } // namespace image
  26. } // namespace mozilla
  27. #endif // mozilla_image_SurfaceCacheUtils_h