SkBRDAllocator.h 685 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright 2015 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkBRDAllocator_DEFINED
  8. #define SkBRDAllocator_DEFINED
  9. #include "include/codec/SkCodec.h"
  10. #include "include/core/SkBitmap.h"
  11. /**
  12. * Abstract subclass of SkBitmap's allocator.
  13. * Allows the allocator to indicate if the memory it allocates
  14. * is zero initialized.
  15. */
  16. class SkBRDAllocator : public SkBitmap::Allocator {
  17. public:
  18. /**
  19. * Indicates if the memory allocated by this allocator is
  20. * zero initialized.
  21. */
  22. virtual SkCodec::ZeroInitialized zeroInit() const = 0;
  23. };
  24. #endif // SkBRDAllocator_DEFINED