5#ifndef FLUTTER_IMPELLER_CORE_FORMATS_H_
6#define FLUTTER_IMPELLER_CORE_FORMATS_H_
14#include "flutter/fml/hash_combine.h"
15#include "flutter/fml/logging.h"
66 return "DevicePrivate";
68 return "DeviceTransient";
150 return "R8G8UNormInt";
152 return "R8G8B8A8UNormInt";
154 return "R8G8B8A8UNormIntSRGB";
156 return "B8G8R8A8UNormInt";
158 return "B8G8R8A8UNormIntSRGB";
160 return "R32G32B32A32Float";
162 return "R16G16B16A16Float";
164 return "B10G10R10XR";
166 return "B10G10R10XRSRGB";
168 return "B10G10R10A10XR";
172 return "D24UnormS8Uint";
174 return "D32FloatS8UInt";
234 return "MultisampleResolve";
236 return "StoreAndMultisampleResolve";
275 return "Texture2DMultisample";
277 return "TextureCube";
279 return "TextureExternalOES";
318 return "ShaderWrite";
320 return "RenderTarget";
526 constexpr size_t Hash()
const {
static uint32_t hash(const SkShaderBase::GradientInfo &v)
uint32_t uint32_t * format
#define FML_UNREACHABLE()
#define IMPELLER_ENUM_IS_MASK(enum_name)
Declare this in the "impeller" namespace to make the enum maskable.
constexpr std::size_t HashCombine()
constexpr size_t BytesPerPixelForPixelFormat(PixelFormat format)
constexpr bool CanClearAttachment(LoadAction action)
std::string DepthAttachmentToString(const DepthAttachment &depth)
std::string ColorAttachmentToString(const ColorAttachment &color)
@ kOneMinusDestinationAlpha
@ kOneMinusDestinationColor
PrimitiveType
Decides how backend draws pixels based on input vertices.
@ kPoint
Draws a point at each input vertex.
constexpr bool IsDepthWritable(PixelFormat format)
std::string StencilAttachmentToString(const StencilAttachment &stencil)
std::string TextureUsageMaskToString(TextureUsageMask mask)
StorageMode
Specified where the allocation resides and how it is used.
std::string AttachmentToString(const Attachment &attachment)
@ kDecal
decal sampling mode is only supported on devices that pass the Capabilities.SupportsDecalSamplerAddre...
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
@ kEqual
Comparison test passes if new_value == current_value.
@ kLessEqual
Comparison test passes if new_value <= current_value.
@ kGreaterEqual
Comparison test passes if new_value >= current_value.
@ kAlways
Comparison test passes always passes.
@ kLess
Comparison test passes if new_value < current_value.
@ kGreater
Comparison test passes if new_value > current_value.
@ kNotEqual
Comparison test passes if new_value != current_value.
@ kNever
Comparison test never passes.
constexpr const char * LoadActionToString(LoadAction action)
constexpr const char * StoreActionToString(StoreAction action)
@ kDecrementWrap
Decrement the current stencil value by 1. If at zero, set to maximum.
@ kSetToReferenceValue
Reset the stencil value to the reference value.
@ kDecrementClamp
Decrement the current stencil value by 1. Clamp it to zero.
@ kIncrementClamp
Increment the current stencil value by 1. Clamp it to the maximum.
@ kIncrementWrap
Increment the current stencil value by 1. If at maximum, set to zero.
@ kInvert
Perform a logical bitwise invert on the current stencil value.
@ kKeep
Don't modify the current stencil value.
@ kStoreAndMultisampleResolve
constexpr bool IsStencilWritable(PixelFormat format)
@ kNearest
Select nearest to the sample point. Most widely supported.
constexpr const char * TextureTypeToString(TextureType type)
constexpr const char * StorageModeToString(StorageMode mode)
constexpr bool IsMultisampleCapable(TextureType type)
constexpr const char * TextureUsageToString(TextureUsage usage)
Mask< TextureUsage > TextureUsageMask
constexpr const char * PixelFormatToString(PixelFormat format)
constexpr bool CanDiscardAttachmentWhenDone(StoreAction action)
static void usage(char *argv0)
std::shared_ptr< Texture > resolve_texture
std::shared_ptr< Texture > texture
Describe the color attachment that will be used with this pipeline.
BlendOperation color_blend_op
constexpr size_t Hash() const
BlendFactor dst_color_blend_factor
ColorWriteMask write_mask
BlendFactor src_alpha_blend_factor
constexpr bool operator==(const ColorAttachmentDescriptor &o) const
BlendOperation alpha_blend_op
BlendFactor src_color_blend_factor
BlendFactor dst_alpha_blend_factor
static constexpr Color BlackTransparent()
constexpr bool operator==(const DepthAttachmentDescriptor &o) const
CompareFunction depth_compare
constexpr size_t GetHash() const
constexpr bool operator==(const DepthRange &other) const
StencilOperation stencil_failure
CompareFunction stencil_compare
StencilOperation depth_failure
constexpr bool operator==(const StencilAttachmentDescriptor &o) const
constexpr size_t GetHash() const
StencilOperation depth_stencil_pass
constexpr bool operator==(const Viewport &other) const
constexpr std::size_t operator()(const impeller::DepthAttachmentDescriptor &des) const
constexpr std::size_t operator()(const impeller::StencilAttachmentDescriptor &des) const