blob: 5760179b601478d056d4c1c864a17df18bf1d299 [file] [log] [blame]
Mike Reedd6cb11e2017-11-30 15:33:04 -05001/*
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
8#ifndef SkPngPriv_DEFINED
9#define SkPngPriv_DEFINED
10
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/core/SkTypes.h"
Mike Reedd6cb11e2017-11-30 15:33:04 -050012
13// We store kAlpha_8 images as GrayAlpha in png. Our private signal is significant bits for gray.
14// If that is set to 1, we assume the gray channel can be ignored, and we output just alpha.
15// We tried 0 at first, but png doesn't like a 0 sigbit for a channel it expects, hence we chose 1.
16
17static constexpr int kGraySigBit_GrayAlphaIsJustAlpha = 1;
18
19#endif