SkPngPriv.h 592 B

12345678910111213141516171819
  1. /*
  2. * Copyright 2017 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 SkPngPriv_DEFINED
  8. #define SkPngPriv_DEFINED
  9. #include "include/core/SkTypes.h"
  10. // We store kAlpha_8 images as GrayAlpha in png. Our private signal is significant bits for gray.
  11. // If that is set to 1, we assume the gray channel can be ignored, and we output just alpha.
  12. // We tried 0 at first, but png doesn't like a 0 sigbit for a channel it expects, hence we chose 1.
  13. static constexpr int kGraySigBit_GrayAlphaIsJustAlpha = 1;
  14. #endif