aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkPngPriv.h
blob: 3269309075d070f7a21a16bb477f7d6c6b0b647b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright 2017 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkPngPriv_DEFINED
#define SkPngPriv_DEFINED

#include "SkTypes.h"

// We store kAlpha_8 images as GrayAlpha in png. Our private signal is significant bits for gray.
// If that is set to 1, we assume the gray channel can be ignored, and we output just alpha.
// We tried 0 at first, but png doesn't like a 0 sigbit for a channel it expects, hence we chose 1.

static constexpr int kGraySigBit_GrayAlphaIsJustAlpha = 1;

#endif