5#include "core/fxge/calculate_pitch.h"
7#include "core/fxcrt/fx_safe_types.h"
8#include "core/fxge/dib/fx_dib.h"
36 uint32_t components_per_pixel,
37 int width_in_pixels) {
38 return CalculatePitch8Safely(bits_per_component, components_per_pixel,
44 return CalculatePitch32Safely(bits_per_pixel, width_in_pixels).ValueOrDie();
49 int width_in_pixels) {
51 CalculatePitch8Safely(bits_per_component, components, width_in_pixels);
54 return pitch.ValueOrDie();
58 int width_in_pixels) {
60 CalculatePitch32Safely(bits_per_pixel, width_in_pixels);
63 return pitch.ValueOrDie();
pdfium::CheckedNumeric< uint32_t > FX_SAFE_UINT32
std::optional< uint32_t > CalculatePitch8(uint32_t bits_per_component, uint32_t components_per_pixel, int width_in_pixels)
std::optional< uint32_t > CalculatePitch32(int bits_per_pixel, int width_in_pixels)
uint32_t CalculatePitch8OrDie(uint32_t bits_per_component, uint32_t components_per_pixel, int width_in_pixels)
uint32_t CalculatePitch32OrDie(int bits_per_pixel, int width_in_pixels)