xref: /aosp_15_r20/external/pdfium/core/fxge/calculate_pitch.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2022 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CORE_FXGE_CALCULATE_PITCH_H_
6 #define CORE_FXGE_CALCULATE_PITCH_H_
7 
8 #include <stdint.h>
9 
10 #include "third_party/abseil-cpp/absl/types/optional.h"
11 
12 namespace fxge {
13 
14 uint32_t CalculatePitch8OrDie(uint32_t bpc, uint32_t components, int width);
15 uint32_t CalculatePitch32OrDie(int bpp, int width);
16 absl::optional<uint32_t> CalculatePitch8(uint32_t bpc,
17                                          uint32_t components,
18                                          int width);
19 absl::optional<uint32_t> CalculatePitch32(int bpp, int width);
20 
21 }  // namespace fxge
22 
23 #endif  // CORE_FXGE_CALCULATE_PITCH_H_
24