5#include "core/fxge/calculate_pitch.h"
7#include "core/fxcrt/fx_safe_types.h"
8#include "core/fxge/dib/fx_dib.h"
13FX_SAFE_UINT32 CalculatePitch8Safely(uint32_t bpc,
16 FX_SAFE_UINT32 pitch = bpc;
24FX_SAFE_UINT32 CalculatePitch32Safely(
int bpp,
int width) {
25 FX_SAFE_UINT32 pitch = bpp;
36 return CalculatePitch8Safely(bpc, components, width).ValueOrDie();
40 return CalculatePitch32Safely(bpp, width).ValueOrDie();
46 FX_SAFE_UINT32 pitch = CalculatePitch8Safely(bpc, components, width);
49 return pitch.ValueOrDie();
53 FX_SAFE_UINT32 pitch = CalculatePitch32Safely(bpp, width);
56 return pitch.ValueOrDie();
absl::optional< uint32_t > CalculatePitch8(uint32_t bpc, uint32_t components, int width)
absl::optional< uint32_t > CalculatePitch32(int bpp, int width)
uint32_t CalculatePitch32OrDie(int bpp, int width)
uint32_t CalculatePitch8OrDie(uint32_t bpc, uint32_t components, int width)