ReactOS 0.4.17-dev-934-g091855f
effect.c File Reference
#include "d2d1_private.h"
Include dependency graph for effect.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d2d)
 
static struct d2d_transform * impl_from_ID2D1OffsetTransform (ID2D1OffsetTransform *iface)
 
static struct d2d_transform * impl_from_ID2D1BlendTransform (ID2D1BlendTransform *iface)
 
static struct d2d_transform * impl_from_ID2D1BorderTransform (ID2D1BorderTransform *iface)
 
static struct d2d_transform * impl_from_ID2D1BoundsAdjustmentTransform (ID2D1BoundsAdjustmentTransform *iface)
 
static struct d2d_vertex_buffer * impl_from_ID2D1VertexBuffer (ID2D1VertexBuffer *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_QueryInterface (ID2D1VertexBuffer *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_AddRef (ID2D1VertexBuffer *iface)
 
static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_Release (ID2D1VertexBuffer *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Map (ID2D1VertexBuffer *iface, BYTE **data, UINT32 size)
 
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Unmap (ID2D1VertexBuffer *iface)
 
static HRESULT d2d_vertex_buffer_create (ID2D1VertexBuffer **buffer)
 
static HRESULT STDMETHODCALLTYPE d2d_offset_transform_QueryInterface (ID2D1OffsetTransform *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_offset_transform_AddRef (ID2D1OffsetTransform *iface)
 
static ULONG STDMETHODCALLTYPE d2d_offset_transform_Release (ID2D1OffsetTransform *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_offset_transform_GetInputCount (ID2D1OffsetTransform *iface)
 
static void STDMETHODCALLTYPE d2d_offset_transform_SetOffset (ID2D1OffsetTransform *iface, D2D1_POINT_2L offset)
 
static D2D1_POINT_2L *STDMETHODCALLTYPE d2d_offset_transform_GetOffset (ID2D1OffsetTransform *iface, D2D1_POINT_2L *offset)
 
static HRESULT d2d_offset_transform_create (D2D1_POINT_2L offset, ID2D1OffsetTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_blend_transform_QueryInterface (ID2D1BlendTransform *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_blend_transform_AddRef (ID2D1BlendTransform *iface)
 
static ULONG STDMETHODCALLTYPE d2d_blend_transform_Release (ID2D1BlendTransform *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_blend_transform_GetInputCount (ID2D1BlendTransform *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_blend_transform_SetOutputBuffer (ID2D1BlendTransform *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
 
static void STDMETHODCALLTYPE d2d_blend_transform_SetCached (ID2D1BlendTransform *iface, BOOL is_cached)
 
static void STDMETHODCALLTYPE d2d_blend_transform_SetDescription (ID2D1BlendTransform *iface, const D2D1_BLEND_DESCRIPTION *description)
 
static void STDMETHODCALLTYPE d2d_blend_transform_GetDescription (ID2D1BlendTransform *iface, D2D1_BLEND_DESCRIPTION *description)
 
static HRESULT d2d_blend_transform_create (UINT32 input_count, const D2D1_BLEND_DESCRIPTION *blend_desc, ID2D1BlendTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_border_transform_QueryInterface (ID2D1BorderTransform *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_border_transform_AddRef (ID2D1BorderTransform *iface)
 
static ULONG STDMETHODCALLTYPE d2d_border_transform_Release (ID2D1BorderTransform *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_border_transform_GetInputCount (ID2D1BorderTransform *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_border_transform_SetOutputBuffer (ID2D1BorderTransform *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
 
static void STDMETHODCALLTYPE d2d_border_transform_SetCached (ID2D1BorderTransform *iface, BOOL is_cached)
 
static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeX (ID2D1BorderTransform *iface, D2D1_EXTEND_MODE mode)
 
static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeY (ID2D1BorderTransform *iface, D2D1_EXTEND_MODE mode)
 
static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeX (ID2D1BorderTransform *iface)
 
static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeY (ID2D1BorderTransform *iface)
 
static HRESULT d2d_border_transform_create (D2D1_EXTEND_MODE mode_x, D2D1_EXTEND_MODE mode_y, ID2D1BorderTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_bounds_adjustment_transform_QueryInterface (ID2D1BoundsAdjustmentTransform *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_AddRef (ID2D1BoundsAdjustmentTransform *iface)
 
static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_Release (ID2D1BoundsAdjustmentTransform *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetInputCount (ID2D1BoundsAdjustmentTransform *iface)
 
static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_SetOutputBounds (ID2D1BoundsAdjustmentTransform *iface, const D2D1_RECT_L *bounds)
 
static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetOutputBounds (ID2D1BoundsAdjustmentTransform *iface, D2D1_RECT_L *bounds)
 
static HRESULT d2d_bounds_adjustment_transform_create (const D2D1_RECT_L *rect, ID2D1BoundsAdjustmentTransform **transform)
 
static struct d2d_transform_node * d2d_transform_graph_get_node (const struct d2d_transform_graph *graph, ID2D1TransformNode *object)
 
static HRESULT d2d_transform_graph_add_node (struct d2d_transform_graph *graph, ID2D1TransformNode *object)
 
static void d2d_transform_node_disconnect (struct d2d_transform_node *node)
 
static void d2d_transform_graph_delete_node (struct d2d_transform_graph *graph, struct d2d_transform_node *node)
 
static void d2d_transform_graph_clear (struct d2d_transform_graph *graph)
 
static struct d2d_transform_graph * impl_from_ID2D1TransformGraph (ID2D1TransformGraph *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_QueryInterface (ID2D1TransformGraph *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_transform_graph_AddRef (ID2D1TransformGraph *iface)
 
static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release (ID2D1TransformGraph *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_transform_graph_GetInputCount (ID2D1TransformGraph *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetSingleTransformNode (ID2D1TransformGraph *iface, ID2D1TransformNode *object)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_AddNode (ID2D1TransformGraph *iface, ID2D1TransformNode *object)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_RemoveNode (ID2D1TransformGraph *iface, ID2D1TransformNode *object)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetOutputNode (ID2D1TransformGraph *iface, ID2D1TransformNode *object)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode (ID2D1TransformGraph *iface, ID2D1TransformNode *from_node, ID2D1TransformNode *to_node, UINT32 index)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectToEffectInput (ID2D1TransformGraph *iface, UINT32 input_index, ID2D1TransformNode *object, UINT32 node_index)
 
static void STDMETHODCALLTYPE d2d_transform_graph_Clear (ID2D1TransformGraph *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetPassthroughGraph (ID2D1TransformGraph *iface, UINT32 index)
 
static HRESULT d2d_transform_graph_create (UINT32 input_count, struct d2d_transform_graph **graph)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_QueryInterface (ID2D1EffectImpl *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_effect_impl_AddRef (ID2D1EffectImpl *iface)
 
static ULONG STDMETHODCALLTYPE d2d_effect_impl_Release (ID2D1EffectImpl *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_Initialize (ID2D1EffectImpl *iface, ID2D1EffectContext *context, ID2D1TransformGraph *graph)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_PrepareForRender (ID2D1EffectImpl *iface, D2D1_CHANGE_TYPE type)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_SetGraph (ID2D1EffectImpl *iface, ID2D1TransformGraph *graph)
 
static HRESULT STDMETHODCALLTYPE builtin_factory_stub (IUnknown **effect_impl)
 
void d2d_effects_init_builtins (struct d2d_factory *factory)
 
static HRESULT d2d_effect_parse_float_array (D2D1_PROPERTY_TYPE type, const WCHAR *value, float *vec)
 
static HRESULT d2d_effect_properties_internal_add (struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, BOOL subprop, D2D1_PROPERTY_TYPE type, const WCHAR *value)
 
HRESULT d2d_effect_properties_add (struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, D2D1_PROPERTY_TYPE type, const WCHAR *value)
 
HRESULT d2d_effect_subproperties_add (struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, D2D1_PROPERTY_TYPE type, const WCHAR *value)
 
static HRESULT d2d_effect_duplicate_properties (struct d2d_effect *effect, struct d2d_effect_properties *dst, const struct d2d_effect_properties *src)
 
static struct d2d_effect_property * d2d_effect_properties_get_property_by_index (const struct d2d_effect_properties *properties, UINT32 index)
 
struct d2d_effect_property * d2d_effect_properties_get_property_by_name (const struct d2d_effect_properties *properties, const WCHAR *name)
 
static UINT32 d2d_effect_properties_get_value_size (const struct d2d_effect_properties *properties, UINT32 index)
 
static HRESULT d2d_effect_return_string (const WCHAR *str, WCHAR *buffer, UINT32 buffer_size)
 
static HRESULT d2d_effect_property_get_value (const struct d2d_effect_properties *properties, const struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 size)
 
HRESULT d2d_effect_property_get_uint32_value (const struct d2d_effect_properties *properties, const struct d2d_effect_property *prop, UINT32 *value)
 
static HRESULT d2d_effect_property_set_value (struct d2d_effect_properties *properties, struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size)
 
void d2d_effect_properties_cleanup (struct d2d_effect_properties *props)
 
static struct d2d_effect_context * impl_from_ID2D1EffectContext (ID2D1EffectContext *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_QueryInterface (ID2D1EffectContext *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_effect_context_AddRef (ID2D1EffectContext *iface)
 
static ULONG STDMETHODCALLTYPE d2d_effect_context_Release (ID2D1EffectContext *iface)
 
static void STDMETHODCALLTYPE d2d_effect_context_GetDpi (ID2D1EffectContext *iface, float *dpi_x, float *dpi_y)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect (ID2D1EffectContext *iface, REFCLSID clsid, ID2D1Effect **effect)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_GetMaximumSupportedFeatureLevel (ID2D1EffectContext *iface, const D3D_FEATURE_LEVEL *levels, UINT32 level_count, D3D_FEATURE_LEVEL *max_level)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateTransformNodeFromEffect (ID2D1EffectContext *iface, ID2D1Effect *effect, ID2D1TransformNode **node)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBlendTransform (ID2D1EffectContext *iface, UINT32 num_inputs, const D2D1_BLEND_DESCRIPTION *description, ID2D1BlendTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBorderTransform (ID2D1EffectContext *iface, D2D1_EXTEND_MODE mode_x, D2D1_EXTEND_MODE mode_y, ID2D1BorderTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateOffsetTransform (ID2D1EffectContext *iface, D2D1_POINT_2L offset, ID2D1OffsetTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBoundsAdjustmentTransform (ID2D1EffectContext *iface, const D2D1_RECT_L *output_rect, ID2D1BoundsAdjustmentTransform **transform)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadPixelShader (ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadVertexShader (ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadComputeShader (ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
 
static BOOL STDMETHODCALLTYPE d2d_effect_context_IsShaderLoaded (ID2D1EffectContext *iface, REFGUID shader_id)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateResourceTexture (ID2D1EffectContext *iface, const GUID *id, const D2D1_RESOURCE_TEXTURE_PROPERTIES *texture_properties, const BYTE *data, const UINT32 *strides, UINT32 data_size, ID2D1ResourceTexture **texture)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindResourceTexture (ID2D1EffectContext *iface, const GUID *id, ID2D1ResourceTexture **texture)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateVertexBuffer (ID2D1EffectContext *iface, const D2D1_VERTEX_BUFFER_PROPERTIES *buffer_properties, const GUID *id, const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *custom_buffer_properties, ID2D1VertexBuffer **buffer)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindVertexBuffer (ID2D1EffectContext *iface, const GUID *id, ID2D1VertexBuffer **buffer)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContext (ID2D1EffectContext *iface, D2D1_COLOR_SPACE space, const BYTE *profile, UINT32 profile_size, ID2D1ColorContext **color_context)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromFilename (ID2D1EffectContext *iface, const WCHAR *filename, ID2D1ColorContext **color_context)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromWicColorContext (ID2D1EffectContext *iface, IWICColorContext *wic_color_context, ID2D1ColorContext **color_context)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CheckFeatureSupport (ID2D1EffectContext *iface, D2D1_FEATURE feature, void *data, UINT32 data_size)
 
static BOOL STDMETHODCALLTYPE d2d_effect_context_IsBufferPrecisionSupported (ID2D1EffectContext *iface, D2D1_BUFFER_PRECISION precision)
 
void d2d_effect_context_init (struct d2d_effect_context *effect_context, struct d2d_device_context *device_context)
 
static struct d2d_effect * impl_from_ID2D1Effect (ID2D1Effect *iface)
 
static void d2d_effect_cleanup (struct d2d_effect *effect)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface (ID2D1Effect *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_effect_AddRef (ID2D1Effect *iface)
 
static ULONG STDMETHODCALLTYPE d2d_effect_Release (ID2D1Effect *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount (ID2D1Effect *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName (ID2D1Effect *iface, UINT32 index, WCHAR *name, UINT32 name_count)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength (ID2D1Effect *iface, UINT32 index)
 
static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType (ID2D1Effect *iface, UINT32 index)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex (ID2D1Effect *iface, const WCHAR *name)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName (ID2D1Effect *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue (ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName (ID2D1Effect *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
 
static HRESULT d2d_effect_get_value (struct d2d_effect *effect, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue (ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize (ID2D1Effect *iface, UINT32 index)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties (ID2D1Effect *iface, UINT32 index, ID2D1Properties **props)
 
static void STDMETHODCALLTYPE d2d_effect_SetInput (ID2D1Effect *iface, UINT32 index, ID2D1Image *input, BOOL invalidate)
 
static HRESULT d2d_effect_set_input_count (struct d2d_effect *effect, UINT32 count)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount (ID2D1Effect *iface, UINT32 count)
 
static void STDMETHODCALLTYPE d2d_effect_GetInput (ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount (ID2D1Effect *iface)
 
static void STDMETHODCALLTYPE d2d_effect_GetOutput (ID2D1Effect *iface, ID2D1Image **output)
 
static struct d2d_effect * impl_from_ID2D1Image (ID2D1Image *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_image_QueryInterface (ID2D1Image *iface, REFIID iid, void **out)
 
static ULONG STDMETHODCALLTYPE d2d_effect_image_AddRef (ID2D1Image *iface)
 
static ULONG STDMETHODCALLTYPE d2d_effect_image_Release (ID2D1Image *iface)
 
static void STDMETHODCALLTYPE d2d_effect_image_GetFactory (ID2D1Image *iface, ID2D1Factory **factory)
 
static struct d2d_effect_properties * impl_from_ID2D1Properties (ID2D1Properties *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_QueryInterface (ID2D1Properties *iface, REFIID riid, void **obj)
 
static ULONG STDMETHODCALLTYPE d2d_effect_properties_AddRef (ID2D1Properties *iface)
 
static ULONG STDMETHODCALLTYPE d2d_effect_properties_Release (ID2D1Properties *iface)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyCount (ID2D1Properties *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetPropertyName (ID2D1Properties *iface, UINT32 index, WCHAR *name, UINT32 name_count)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyNameLength (ID2D1Properties *iface, UINT32 index)
 
static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_properties_GetType (ID2D1Properties *iface, UINT32 index)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyIndex (ID2D1Properties *iface, const WCHAR *name)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValueByName (ID2D1Properties *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValue (ID2D1Properties *iface, UINT32 index, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValueByName (ID2D1Properties *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValue (ID2D1Properties *iface, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
 
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetValueSize (ID2D1Properties *iface, UINT32 index)
 
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetSubProperties (ID2D1Properties *iface, UINT32 index, ID2D1Properties **props)
 
void d2d_effect_init_properties (struct d2d_effect *effect, struct d2d_effect_properties *properties)
 
static struct d2d_render_info * impl_from_ID2D1DrawInfo (ID2D1DrawInfo *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_QueryInterface (ID2D1DrawInfo *iface, REFIID iid, void **obj)
 
static ULONG STDMETHODCALLTYPE d2d_draw_info_AddRef (ID2D1DrawInfo *iface)
 
static ULONG STDMETHODCALLTYPE d2d_draw_info_Release (ID2D1DrawInfo *iface)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetInputDescription (ID2D1DrawInfo *iface, UINT32 index, D2D1_INPUT_DESCRIPTION description)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetOutputBuffer (ID2D1DrawInfo *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
 
static void STDMETHODCALLTYPE d2d_draw_info_SetCached (ID2D1DrawInfo *iface, BOOL is_cached)
 
static void STDMETHODCALLTYPE d2d_draw_info_SetInstructionCountHint (ID2D1DrawInfo *iface, UINT32 count)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShaderConstantBuffer (ID2D1DrawInfo *iface, const BYTE *buffer, UINT32 size)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetResourceTexture (ID2D1DrawInfo *iface, UINT32 index, ID2D1ResourceTexture *texture)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexShaderConstantBuffer (ID2D1DrawInfo *iface, const BYTE *buffer, UINT32 size)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShader (ID2D1DrawInfo *iface, REFGUID id, D2D1_PIXEL_OPTIONS options)
 
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexProcessing (ID2D1DrawInfo *iface, ID2D1VertexBuffer *buffer, D2D1_VERTEX_OPTIONS options, const D2D1_BLEND_DESCRIPTION *description, const D2D1_VERTEX_RANGE *range, const GUID *shader)
 
static HRESULT d2d_effect_render_info_create (struct d2d_render_info **obj)
 
static bool d2d_transform_node_needs_render_info (const struct d2d_transform_node *node)
 
static HRESULT d2d_effect_transform_graph_initialize_nodes (struct d2d_transform_graph *graph)
 
HRESULT d2d_effect_create (struct d2d_device_context *context, const CLSID *effect_id, ID2D1Effect **effect)
 

Variables

static const ID2D1VertexBufferVtbl d2d_vertex_buffer_vtbl
 
static const ID2D1OffsetTransformVtbl d2d_offset_transform_vtbl
 
static const ID2D1BlendTransformVtbl d2d_blend_transform_vtbl
 
static const ID2D1BorderTransformVtbl d2d_border_transform_vtbl
 
static const ID2D1BoundsAdjustmentTransformVtbl d2d_bounds_adjustment_transform_vtbl
 
static const ID2D1TransformGraphVtbl d2d_transform_graph_vtbl
 
static const ID2D1EffectImplVtbl d2d_effect_impl_vtbl
 
static const WCHAR _2d_affine_transform_description []
 
static const WCHAR _3d_perspective_transform_description []
 
static const WCHAR composite_description []
 
static const WCHAR crop_description []
 
static const WCHAR shadow_description []
 
static const WCHAR grayscale_description []
 
static const ID2D1EffectContextVtbl d2d_effect_context_vtbl
 
static const ID2D1EffectVtbl d2d_effect_vtbl
 
static const ID2D1ImageVtbl d2d_effect_image_vtbl
 
static const ID2D1PropertiesVtbl d2d_effect_properties_vtbl
 
static const ID2D1DrawInfoVtbl d2d_draw_info_vtbl
 

Function Documentation

◆ builtin_factory_stub()

static HRESULT STDMETHODCALLTYPE builtin_factory_stub ( IUnknown **  effect_impl)
static

Definition at line 991 of file effect.c.

992{
993 static ID2D1EffectImpl builtin_stub = { &d2d_effect_impl_vtbl };
994
995 *effect_impl = (IUnknown *)&builtin_stub;
996
997 return S_OK;
998}
static const ID2D1EffectImplVtbl d2d_effect_impl_vtbl
Definition: effect.c:981
#define S_OK
Definition: intsafe.h:52

Referenced by d2d_effects_init_builtins().

◆ d2d_blend_transform_AddRef()

static ULONG STDMETHODCALLTYPE d2d_blend_transform_AddRef ( ID2D1BlendTransform *  iface)
static

Definition at line 244 of file effect.c.

245{
248
249 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
250
251 return refcount;
252}
#define InterlockedIncrement
Definition: armddk.h:53
static struct d2d_transform * impl_from_ID2D1BlendTransform(ID2D1BlendTransform *iface)
Definition: effect.c:28
GLuint GLenum GLenum transform
Definition: glext.h:9407
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t ULONG
Definition: typedefs.h:59

◆ d2d_blend_transform_create()

static HRESULT d2d_blend_transform_create ( UINT32  input_count,
const D2D1_BLEND_DESCRIPTION *  blend_desc,
ID2D1BlendTransform **  transform 
)
static

Definition at line 322 of file effect.c.

324{
325 struct d2d_transform *object;
326
327 *transform = NULL;
328
329 if (!input_count)
330 return E_INVALIDARG;
331
332 if (!(object = calloc(1, sizeof(*object))))
333 return E_OUTOFMEMORY;
334
335 object->ID2D1TransformNode_iface.lpVtbl = (ID2D1TransformNodeVtbl *)&d2d_blend_transform_vtbl;
336 object->refcount = 1;
337 object->input_count = input_count;
338 object->blend_desc = *blend_desc;
339
340 *transform = (ID2D1BlendTransform *)&object->ID2D1TransformNode_iface;
341
342 return S_OK;
343}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
static const ID2D1BlendTransformVtbl d2d_blend_transform_vtbl
Definition: effect.c:310
#define calloc
Definition: rosglue.h:14
D2D1_BLEND_DESCRIPTION blend_desc
Definition: d2d1_private.h:729
UINT32 input_count
Definition: d2d1_private.h:738

Referenced by d2d_effect_context_CreateBlendTransform().

◆ d2d_blend_transform_GetDescription()

static void STDMETHODCALLTYPE d2d_blend_transform_GetDescription ( ID2D1BlendTransform *  iface,
D2D1_BLEND_DESCRIPTION *  description 
)
static

Definition at line 300 of file effect.c.

302{
304
305 TRACE("iface %p, description %p.\n", iface, description);
306
307 *description = transform->blend_desc;
308}

◆ d2d_blend_transform_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_blend_transform_GetInputCount ( ID2D1BlendTransform *  iface)
static

Definition at line 267 of file effect.c.

268{
270
271 TRACE("iface %p.\n", iface);
272
273 return transform->input_count;
274}

◆ d2d_blend_transform_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_blend_transform_QueryInterface ( ID2D1BlendTransform *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 224 of file effect.c.

226{
227 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
228
229 if (IsEqualGUID(iid, &IID_ID2D1BlendTransform)
230 || IsEqualGUID(iid, &IID_ID2D1ConcreteTransform)
231 || IsEqualGUID(iid, &IID_ID2D1TransformNode)
232 || IsEqualGUID(iid, &IID_IUnknown))
233 {
234 *out = iface;
235 ID2D1BlendTransform_AddRef(iface);
236 return S_OK;
237 }
238
239 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
240 *out = NULL;
241 return E_NOINTERFACE;
242}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ d2d_blend_transform_Release()

static ULONG STDMETHODCALLTYPE d2d_blend_transform_Release ( ID2D1BlendTransform *  iface)
static

Definition at line 254 of file effect.c.

255{
258
259 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
260
261 if (!refcount)
263
264 return refcount;
265}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5

◆ d2d_blend_transform_SetCached()

static void STDMETHODCALLTYPE d2d_blend_transform_SetCached ( ID2D1BlendTransform *  iface,
BOOL  is_cached 
)
static

Definition at line 284 of file effect.c.

286{
287 FIXME("iface %p, is_cached %d stub.\n", iface, is_cached);
288}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ d2d_blend_transform_SetDescription()

static void STDMETHODCALLTYPE d2d_blend_transform_SetDescription ( ID2D1BlendTransform *  iface,
const D2D1_BLEND_DESCRIPTION *  description 
)
static

Definition at line 290 of file effect.c.

292{
294
295 TRACE("iface %p, description %p.\n", iface, description);
296
297 transform->blend_desc = *description;
298}
void * description

◆ d2d_blend_transform_SetOutputBuffer()

static HRESULT STDMETHODCALLTYPE d2d_blend_transform_SetOutputBuffer ( ID2D1BlendTransform *  iface,
D2D1_BUFFER_PRECISION  precision,
D2D1_CHANNEL_DEPTH  depth 
)
static

Definition at line 276 of file effect.c.

278{
279 FIXME("iface %p, precision %u, depth %u stub.\n", iface, precision, depth);
280
281 return E_NOTIMPL;
282}
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLenum GLint GLint * precision
Definition: glext.h:7539

◆ d2d_border_transform_AddRef()

static ULONG STDMETHODCALLTYPE d2d_border_transform_AddRef ( ID2D1BorderTransform *  iface)
static

Definition at line 365 of file effect.c.

366{
369
370 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
371
372 return refcount;
373}
static struct d2d_transform * impl_from_ID2D1BorderTransform(ID2D1BorderTransform *iface)
Definition: effect.c:33

◆ d2d_border_transform_create()

static HRESULT d2d_border_transform_create ( D2D1_EXTEND_MODE  mode_x,
D2D1_EXTEND_MODE  mode_y,
ID2D1BorderTransform **  transform 
)
static

Definition at line 481 of file effect.c.

483{
484 struct d2d_transform *object;
485
486 *transform = NULL;
487
488 if (!(object = calloc(1, sizeof(*object))))
489 return E_OUTOFMEMORY;
490
491 object->ID2D1TransformNode_iface.lpVtbl = (ID2D1TransformNodeVtbl *)&d2d_border_transform_vtbl;
492 object->refcount = 1;
493 object->border.mode_x = mode_x;
494 object->border.mode_y = mode_y;
495
496 *transform = (ID2D1BorderTransform *)&object->ID2D1TransformNode_iface;
497
498 return S_OK;
499}
static const ID2D1BorderTransformVtbl d2d_border_transform_vtbl
Definition: effect.c:467
D2D1_EXTEND_MODE mode_y
Definition: d2d1_private.h:733
D2D1_EXTEND_MODE mode_x
Definition: d2d1_private.h:732

Referenced by d2d_effect_context_CreateBorderTransform().

◆ d2d_border_transform_GetExtendModeX()

static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeX ( ID2D1BorderTransform *  iface)
static

Definition at line 447 of file effect.c.

449{
451
452 TRACE("iface %p.\n", iface);
453
454 return transform->border.mode_x;
455}

◆ d2d_border_transform_GetExtendModeY()

static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeY ( ID2D1BorderTransform *  iface)
static

Definition at line 457 of file effect.c.

459{
461
462 TRACE("iface %p.\n", iface);
463
464 return transform->border.mode_y;
465}

◆ d2d_border_transform_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_border_transform_GetInputCount ( ID2D1BorderTransform *  iface)
static

Definition at line 388 of file effect.c.

389{
390 TRACE("iface %p.\n", iface);
391
392 return 1;
393}

◆ d2d_border_transform_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_border_transform_QueryInterface ( ID2D1BorderTransform *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 345 of file effect.c.

347{
348 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
349
350 if (IsEqualGUID(iid, &IID_ID2D1BorderTransform)
351 || IsEqualGUID(iid, &IID_ID2D1ConcreteTransform)
352 || IsEqualGUID(iid, &IID_ID2D1TransformNode)
353 || IsEqualGUID(iid, &IID_IUnknown))
354 {
355 *out = iface;
356 ID2D1BorderTransform_AddRef(iface);
357 return S_OK;
358 }
359
360 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
361 *out = NULL;
362 return E_NOINTERFACE;
363}

◆ d2d_border_transform_Release()

static ULONG STDMETHODCALLTYPE d2d_border_transform_Release ( ID2D1BorderTransform *  iface)
static

Definition at line 375 of file effect.c.

376{
379
380 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
381
382 if (!refcount)
384
385 return refcount;
386}

◆ d2d_border_transform_SetCached()

static void STDMETHODCALLTYPE d2d_border_transform_SetCached ( ID2D1BorderTransform *  iface,
BOOL  is_cached 
)
static

Definition at line 403 of file effect.c.

405{
406 FIXME("iface %p, is_cached %d stub.\n", iface, is_cached);
407}

◆ d2d_border_transform_SetExtendModeX()

static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeX ( ID2D1BorderTransform *  iface,
D2D1_EXTEND_MODE  mode 
)
static

Definition at line 409 of file effect.c.

411{
413
414 TRACE("iface %p.\n", iface);
415
416 switch (mode)
417 {
421 transform->border.mode_x = mode;
422 break;
423 default:
424 ;
425 }
426}
@ D2D1_EXTEND_MODE_WRAP
Definition: d2d1.idl:200
@ D2D1_EXTEND_MODE_MIRROR
Definition: d2d1.idl:201
@ D2D1_EXTEND_MODE_CLAMP
Definition: d2d1.idl:199
GLenum mode
Definition: glext.h:6217

◆ d2d_border_transform_SetExtendModeY()

static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeY ( ID2D1BorderTransform *  iface,
D2D1_EXTEND_MODE  mode 
)
static

Definition at line 428 of file effect.c.

430{
432
433 TRACE("iface %p.\n", iface);
434
435 switch (mode)
436 {
440 transform->border.mode_y = mode;
441 break;
442 default:
443 ;
444 }
445}

◆ d2d_border_transform_SetOutputBuffer()

static HRESULT STDMETHODCALLTYPE d2d_border_transform_SetOutputBuffer ( ID2D1BorderTransform *  iface,
D2D1_BUFFER_PRECISION  precision,
D2D1_CHANNEL_DEPTH  depth 
)
static

Definition at line 395 of file effect.c.

397{
398 FIXME("iface %p, precision %u, depth %u stub.\n", iface, precision, depth);
399
400 return E_NOTIMPL;
401}

◆ d2d_bounds_adjustment_transform_AddRef()

static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_AddRef ( ID2D1BoundsAdjustmentTransform *  iface)
static

Definition at line 520 of file effect.c.

522{
525
526 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
527
528 return refcount;
529}
static struct d2d_transform * impl_from_ID2D1BoundsAdjustmentTransform(ID2D1BoundsAdjustmentTransform *iface)
Definition: effect.c:38

◆ d2d_bounds_adjustment_transform_create()

static HRESULT d2d_bounds_adjustment_transform_create ( const D2D1_RECT_L *  rect,
ID2D1BoundsAdjustmentTransform **  transform 
)
static

Definition at line 583 of file effect.c.

585{
586 struct d2d_transform *object;
587
588 *transform = NULL;
589
590 if (!(object = calloc(1, sizeof(*object))))
591 return E_OUTOFMEMORY;
592
593 object->ID2D1TransformNode_iface.lpVtbl = (ID2D1TransformNodeVtbl *)&d2d_bounds_adjustment_transform_vtbl;
594 object->refcount = 1;
595 object->bounds = *rect;
596
597 *transform = (ID2D1BoundsAdjustmentTransform *)&object->ID2D1TransformNode_iface;
598
599 return S_OK;
600}
RECT rect
Definition: combotst.c:67
static const ID2D1BoundsAdjustmentTransformVtbl d2d_bounds_adjustment_transform_vtbl
Definition: effect.c:573

Referenced by d2d_effect_context_CreateBoundsAdjustmentTransform().

◆ d2d_bounds_adjustment_transform_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetInputCount ( ID2D1BoundsAdjustmentTransform *  iface)
static

Definition at line 545 of file effect.c.

547{
548 TRACE("iface %p.\n", iface);
549
550 return 1;
551}

◆ d2d_bounds_adjustment_transform_GetOutputBounds()

static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetOutputBounds ( ID2D1BoundsAdjustmentTransform *  iface,
D2D1_RECT_L *  bounds 
)
static

Definition at line 563 of file effect.c.

565{
567
568 TRACE("iface %p.\n", iface);
569
570 *bounds = transform->bounds;
571}
D2D1_RECT_L bounds
Definition: d2d1_private.h:735

◆ d2d_bounds_adjustment_transform_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_bounds_adjustment_transform_QueryInterface ( ID2D1BoundsAdjustmentTransform *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 501 of file effect.c.

503{
504 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
505
506 if (IsEqualGUID(iid, &IID_ID2D1BoundsAdjustmentTransform)
507 || IsEqualGUID(iid, &IID_ID2D1TransformNode)
508 || IsEqualGUID(iid, &IID_IUnknown))
509 {
510 *out = iface;
511 ID2D1BoundsAdjustmentTransform_AddRef(iface);
512 return S_OK;
513 }
514
515 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
516 *out = NULL;
517 return E_NOINTERFACE;
518}

◆ d2d_bounds_adjustment_transform_Release()

static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_Release ( ID2D1BoundsAdjustmentTransform *  iface)
static

Definition at line 531 of file effect.c.

533{
536
537 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
538
539 if (!refcount)
541
542 return refcount;
543}

◆ d2d_bounds_adjustment_transform_SetOutputBounds()

static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_SetOutputBounds ( ID2D1BoundsAdjustmentTransform *  iface,
const D2D1_RECT_L *  bounds 
)
static

Definition at line 553 of file effect.c.

555{
557
558 TRACE("iface %p.\n", iface);
559
560 transform->bounds = *bounds;
561}

◆ d2d_draw_info_AddRef()

static ULONG STDMETHODCALLTYPE d2d_draw_info_AddRef ( ID2D1DrawInfo *  iface)
static

Definition at line 2474 of file effect.c.

2475{
2476 struct d2d_render_info *render_info = impl_from_ID2D1DrawInfo(iface);
2478
2479 TRACE("iface %p refcount %lu.\n", iface, refcount);
2480
2481 return refcount;
2482}
static struct d2d_render_info * impl_from_ID2D1DrawInfo(ID2D1DrawInfo *iface)
Definition: effect.c:2448

◆ d2d_draw_info_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_QueryInterface ( ID2D1DrawInfo *  iface,
REFIID  iid,
void **  obj 
)
static

Definition at line 2453 of file effect.c.

2455{
2456 TRACE("iface %p, iid %s, obj %p.\n", iface, debugstr_guid(iid), obj);
2457
2458 if (IsEqualGUID(iid, &IID_ID2D1DrawInfo)
2459 || IsEqualGUID(iid, &IID_ID2D1RenderInfo)
2460 || IsEqualGUID(iid, &IID_IUnknown))
2461 {
2462 *obj = iface;
2463 ID2D1DrawInfo_AddRef(iface);
2464 return S_OK;
2465 }
2466
2467 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
2468
2469 *obj = NULL;
2470
2471 return E_NOINTERFACE;
2472}

◆ d2d_draw_info_Release()

static ULONG STDMETHODCALLTYPE d2d_draw_info_Release ( ID2D1DrawInfo *  iface)
static

Definition at line 2484 of file effect.c.

2485{
2486 struct d2d_render_info *render_info = impl_from_ID2D1DrawInfo(iface);
2488
2489 TRACE("iface %p refcount %lu.\n", iface, refcount);
2490
2491 if (!refcount)
2492 free(render_info);
2493
2494 return refcount;
2495}

◆ d2d_draw_info_SetCached()

static void STDMETHODCALLTYPE d2d_draw_info_SetCached ( ID2D1DrawInfo *  iface,
BOOL  is_cached 
)
static

Definition at line 2513 of file effect.c.

2514{
2515 FIXME("iface %p, is_cached %d stub.\n", iface, is_cached);
2516}

◆ d2d_draw_info_SetInputDescription()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetInputDescription ( ID2D1DrawInfo *  iface,
UINT32  index,
D2D1_INPUT_DESCRIPTION  description 
)
static

Definition at line 2497 of file effect.c.

2499{
2500 FIXME("iface %p, index %u stub.\n", iface, index);
2501
2502 return E_NOTIMPL;
2503}
GLuint index
Definition: glext.h:6031

◆ d2d_draw_info_SetInstructionCountHint()

static void STDMETHODCALLTYPE d2d_draw_info_SetInstructionCountHint ( ID2D1DrawInfo *  iface,
UINT32  count 
)
static

Definition at line 2518 of file effect.c.

2520{
2521 FIXME("iface %p, count %u stub.\n", iface, count);
2522}
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ d2d_draw_info_SetOutputBuffer()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetOutputBuffer ( ID2D1DrawInfo *  iface,
D2D1_BUFFER_PRECISION  precision,
D2D1_CHANNEL_DEPTH  depth 
)
static

Definition at line 2505 of file effect.c.

2507{
2508 FIXME("iface %p, precision %u, depth %u stub.\n", iface, precision, depth);
2509
2510 return E_NOTIMPL;
2511}

◆ d2d_draw_info_SetPixelShader()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShader ( ID2D1DrawInfo *  iface,
REFGUID  id,
D2D1_PIXEL_OPTIONS  options 
)
static

Definition at line 2548 of file effect.c.

2550{
2551 struct d2d_render_info *render_info = impl_from_ID2D1DrawInfo(iface);
2552
2553 TRACE("iface %p, id %s, options %u.\n", iface, debugstr_guid(id), options);
2554
2555 render_info->mask |= D2D_RENDER_INFO_PIXEL_SHADER;
2556 render_info->pixel_shader = *id;
2557 return S_OK;
2558}
@ D2D_RENDER_INFO_PIXEL_SHADER
Definition: d2d1_private.h:743
GLuint id
Definition: glext.h:5910
unsigned int mask
Definition: d2d1_private.h:751

◆ d2d_draw_info_SetPixelShaderConstantBuffer()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShaderConstantBuffer ( ID2D1DrawInfo *  iface,
const BYTE *  buffer,
UINT32  size 
)
static

Definition at line 2524 of file effect.c.

2526{
2527 FIXME("iface %p, buffer %p, size %u stub.\n", iface, buffer, size);
2528
2529 return E_NOTIMPL;
2530}
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919

◆ d2d_draw_info_SetResourceTexture()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetResourceTexture ( ID2D1DrawInfo *  iface,
UINT32  index,
ID2D1ResourceTexture *  texture 
)
static

Definition at line 2532 of file effect.c.

2534{
2535 FIXME("iface %p, index %u, texture %p stub.\n", iface, index, texture);
2536
2537 return E_NOTIMPL;
2538}
GLenum GLuint texture
Definition: glext.h:6295

◆ d2d_draw_info_SetVertexProcessing()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexProcessing ( ID2D1DrawInfo *  iface,
ID2D1VertexBuffer *  buffer,
D2D1_VERTEX_OPTIONS  options,
const D2D1_BLEND_DESCRIPTION *  description,
const D2D1_VERTEX_RANGE *  range,
const GUID *  shader 
)
static

Definition at line 2560 of file effect.c.

2564{
2565 FIXME("iface %p, buffer %p, options %#x, description %p, range %p, shader %s stub.\n",
2567
2568 return E_NOTIMPL;
2569}
range
Definition: d3dx9_private.h:58
GLuint shader
Definition: glext.h:6030

◆ d2d_draw_info_SetVertexShaderConstantBuffer()

static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexShaderConstantBuffer ( ID2D1DrawInfo *  iface,
const BYTE *  buffer,
UINT32  size 
)
static

Definition at line 2540 of file effect.c.

2542{
2543 FIXME("iface %p, buffer %p, size %u stub.\n", iface, buffer, size);
2544
2545 return E_NOTIMPL;
2546}

◆ d2d_effect_AddRef()

static ULONG STDMETHODCALLTYPE d2d_effect_AddRef ( ID2D1Effect *  iface)
static

Definition at line 1899 of file effect.c.

1900{
1901 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1903
1904 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
1905
1906 return refcount;
1907}
static struct d2d_effect * impl_from_ID2D1Effect(ID2D1Effect *iface)
Definition: effect.c:1848

Referenced by d2d_effect_image_AddRef().

◆ d2d_effect_cleanup()

static void d2d_effect_cleanup ( struct d2d_effect *  effect)
static

Definition at line 1853 of file effect.c.

1854{
1855 unsigned int i;
1856
1857 for (i = 0; i < effect->input_count; ++i)
1858 {
1859 if (effect->inputs[i])
1860 ID2D1Image_Release(effect->inputs[i]);
1861 }
1862 free(effect->inputs);
1863 ID2D1EffectContext_Release(&effect->effect_context->ID2D1EffectContext_iface);
1864 if (effect->graph)
1865 ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface);
1867 if (effect->impl)
1868 ID2D1EffectImpl_Release(effect->impl);
1869}
void d2d_effect_properties_cleanup(struct d2d_effect_properties *props)
Definition: effect.c:1457
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ID2D1EffectImpl * impl
Definition: d2d1_private.h:793
struct d2d_effect_properties properties
Definition: d2d1_private.h:794
struct d2d_effect_context * effect_context
Definition: d2d1_private.h:795
struct d2d_transform_graph * graph
Definition: d2d1_private.h:796
ID2D1Image ** inputs
Definition: d2d1_private.h:797
size_t input_count
Definition: d2d1_private.h:799

Referenced by d2d_effect_Release().

◆ d2d_effect_context_AddRef()

static ULONG STDMETHODCALLTYPE d2d_effect_context_AddRef ( ID2D1EffectContext *  iface)
static

Definition at line 1501 of file effect.c.

1502{
1503 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1504 ULONG refcount = InterlockedIncrement(&effect_context->refcount);
1505
1506 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
1507
1508 return refcount;
1509}
static struct d2d_effect_context * impl_from_ID2D1EffectContext(ID2D1EffectContext *iface)
Definition: effect.c:1478

◆ d2d_effect_context_CheckFeatureSupport()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CheckFeatureSupport ( ID2D1EffectContext *  iface,
D2D1_FEATURE  feature,
void *  data,
UINT32  data_size 
)
static

Definition at line 1779 of file effect.c.

1781{
1782 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1783 D3D11_FEATURE d3d11_feature;
1784
1785 TRACE("iface %p, feature %#x, data %p, data_size %u.\n", iface, feature, data, data_size);
1786
1787 /* Data structures are compatible. */
1788 switch (feature)
1789 {
1790 case D2D1_FEATURE_DOUBLES: d3d11_feature = D3D11_FEATURE_DOUBLES; break;
1792 default:
1793 WARN("Unexpected feature index %d.\n", feature);
1794 return E_INVALIDARG;
1795 }
1796
1797 return ID3D11Device1_CheckFeatureSupport(effect_context->device_context->d3d_device,
1798 d3d11_feature, data, data_size);
1799}
@ D2D1_FEATURE_DOUBLES
@ D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS
D3D11_FEATURE
Definition: d3d11.idl:660
@ D3D11_FEATURE_DOUBLES
Definition: d3d11.idl:662
@ D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS
Definition: d3d11.idl:665
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
INTERNETFEATURELIST feature
Definition: misc.c:1807
struct d2d_device_context * device_context
Definition: d2d1_private.h:633

◆ d2d_effect_context_CreateBlendTransform()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBlendTransform ( ID2D1EffectContext *  iface,
UINT32  num_inputs,
const D2D1_BLEND_DESCRIPTION *  description,
ID2D1BlendTransform **  transform 
)
static

Definition at line 1563 of file effect.c.

1565{
1566 TRACE("iface %p, num_inputs %u, description %p, transform %p,\n", iface, num_inputs, description, transform);
1567
1569}
static HRESULT d2d_blend_transform_create(UINT32 input_count, const D2D1_BLEND_DESCRIPTION *blend_desc, ID2D1BlendTransform **transform)
Definition: effect.c:322

◆ d2d_effect_context_CreateBorderTransform()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBorderTransform ( ID2D1EffectContext *  iface,
D2D1_EXTEND_MODE  mode_x,
D2D1_EXTEND_MODE  mode_y,
ID2D1BorderTransform **  transform 
)
static

Definition at line 1571 of file effect.c.

1573{
1574 TRACE("iface %p, mode_x %#x, mode_y %#x, transform %p.\n", iface, mode_x, mode_y, transform);
1575
1576 return d2d_border_transform_create(mode_x, mode_y, transform);
1577}
static HRESULT d2d_border_transform_create(D2D1_EXTEND_MODE mode_x, D2D1_EXTEND_MODE mode_y, ID2D1BorderTransform **transform)
Definition: effect.c:481

◆ d2d_effect_context_CreateBoundsAdjustmentTransform()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBoundsAdjustmentTransform ( ID2D1EffectContext *  iface,
const D2D1_RECT_L *  output_rect,
ID2D1BoundsAdjustmentTransform **  transform 
)
static

Definition at line 1587 of file effect.c.

1589{
1590 TRACE("iface %p, output_rect %s, transform %p.\n", iface, debug_d2d_rect_l(output_rect), transform);
1591
1593}
static const char * debug_d2d_rect_l(const D2D1_RECT_L *rect)
static HRESULT d2d_bounds_adjustment_transform_create(const D2D1_RECT_L *rect, ID2D1BoundsAdjustmentTransform **transform)
Definition: effect.c:583

◆ d2d_effect_context_CreateColorContext()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContext ( ID2D1EffectContext *  iface,
D2D1_COLOR_SPACE  space,
const BYTE *  profile,
UINT32  profile_size,
ID2D1ColorContext **  color_context 
)
static

Definition at line 1745 of file effect.c.

1747{
1748 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1749
1750 TRACE("iface %p, space %#x, profile %p, profile_size %u, color_context %p.\n",
1751 iface, space, profile, profile_size, color_context);
1752
1753 return ID2D1DeviceContext6_CreateColorContext(&effect_context->device_context->ID2D1DeviceContext6_iface,
1754 space, profile, profile_size, color_context);
1755}
#define profile
Definition: kernel32.h:12

◆ d2d_effect_context_CreateColorContextFromFilename()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromFilename ( ID2D1EffectContext *  iface,
const WCHAR *  filename,
ID2D1ColorContext **  color_context 
)
static

Definition at line 1757 of file effect.c.

1759{
1760 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1761
1762 TRACE("iface %p, filename %s, color_context %p.\n", iface, debugstr_w(filename), color_context);
1763
1764 return ID2D1DeviceContext6_CreateColorContextFromFilename(&effect_context->device_context->ID2D1DeviceContext6_iface,
1765 filename, color_context);
1766}
const char * filename
Definition: ioapi.h:137
#define debugstr_w
Definition: kernel32.h:32

◆ d2d_effect_context_CreateColorContextFromWicColorContext()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromWicColorContext ( ID2D1EffectContext *  iface,
IWICColorContext *  wic_color_context,
ID2D1ColorContext **  color_context 
)
static

Definition at line 1768 of file effect.c.

1770{
1771 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1772
1773 TRACE("iface %p, wic_color_context %p, color_context %p.\n", iface, wic_color_context, color_context);
1774
1775 return ID2D1DeviceContext6_CreateColorContextFromWicColorContext(&effect_context->device_context->ID2D1DeviceContext6_iface,
1776 wic_color_context, color_context);
1777}

◆ d2d_effect_context_CreateEffect()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect ( ID2D1EffectContext *  iface,
REFCLSID  clsid,
ID2D1Effect **  effect 
)
static

Definition at line 1536 of file effect.c.

1538{
1539 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1540
1541 TRACE("iface %p, clsid %s, effect %p.\n", iface, debugstr_guid(clsid), effect);
1542
1543 return ID2D1DeviceContext6_CreateEffect(&effect_context->device_context->ID2D1DeviceContext6_iface,
1544 clsid, effect);
1545}
const CLSID * clsid
Definition: msctf.cpp:50

◆ d2d_effect_context_CreateOffsetTransform()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateOffsetTransform ( ID2D1EffectContext *  iface,
D2D1_POINT_2L  offset,
ID2D1OffsetTransform **  transform 
)
static

Definition at line 1579 of file effect.c.

1581{
1582 TRACE("iface %p, offset %s, transform %p.\n", iface, debug_d2d_point_2l(&offset), transform);
1583
1585}
static const char * debug_d2d_point_2l(const D2D1_POINT_2L *point)
static HRESULT d2d_offset_transform_create(D2D1_POINT_2L offset, ID2D1OffsetTransform **transform)
Definition: effect.c:208
GLintptr offset
Definition: glext.h:5920

◆ d2d_effect_context_CreateResourceTexture()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateResourceTexture ( ID2D1EffectContext *  iface,
const GUID *  id,
const D2D1_RESOURCE_TEXTURE_PROPERTIES *  texture_properties,
const BYTE *  data,
const UINT32 *  strides,
UINT32  data_size,
ID2D1ResourceTexture **  texture 
)
static

Definition at line 1686 of file effect.c.

1689{
1690 FIXME("iface %p, id %s, texture_properties %p, data %p, strides %p, data_size %u, texture %p stub!\n",
1691 iface, debugstr_guid(id), texture_properties, data, strides, data_size, texture);
1692
1693 return E_NOTIMPL;
1694}

◆ d2d_effect_context_CreateTransformNodeFromEffect()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateTransformNodeFromEffect ( ID2D1EffectContext *  iface,
ID2D1Effect *  effect,
ID2D1TransformNode **  node 
)
static

Definition at line 1555 of file effect.c.

1557{
1558 FIXME("iface %p, effect %p, node %p stub!\n", iface, effect, node);
1559
1560 return E_NOTIMPL;
1561}
Definition: dlist.c:348

◆ d2d_effect_context_CreateVertexBuffer()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateVertexBuffer ( ID2D1EffectContext *  iface,
const D2D1_VERTEX_BUFFER_PROPERTIES *  buffer_properties,
const GUID *  id,
const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *  custom_buffer_properties,
ID2D1VertexBuffer **  buffer 
)
static

Definition at line 1704 of file effect.c.

1708{
1709 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1710 struct d2d_device_context *context = effect_context->device_context;
1711 HRESULT hr;
1712
1713 FIXME("iface %p, buffer_properties %p, id %s, custom_buffer_properties %p, buffer %p stub!\n",
1714 iface, buffer_properties, debugstr_guid(id), custom_buffer_properties, buffer);
1715
1716 if (id && d2d_device_get_indexed_object(&context->vertex_buffers, id, (IUnknown **)buffer))
1717 return S_OK;
1718
1720 {
1721 if (id)
1722 hr = d2d_device_add_indexed_object(&context->vertex_buffers, id, (IUnknown *)*buffer);
1723 }
1724
1725 if (FAILED(hr))
1726 *buffer = NULL;
1727
1728 return hr;
1729}
HRESULT d2d_device_add_indexed_object(struct d2d_indexed_objects *objects, const GUID *id, IUnknown *object)
Definition: device.c:4542
BOOL d2d_device_get_indexed_object(struct d2d_indexed_objects *objects, const GUID *id, IUnknown **object)
Definition: device.c:4560
HRESULT hr
Definition: delayimp.cpp:582
static HRESULT d2d_vertex_buffer_create(ID2D1VertexBuffer **buffer)
Definition: effect.c:113
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
Definition: http.c:7252

◆ d2d_effect_context_FindResourceTexture()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindResourceTexture ( ID2D1EffectContext *  iface,
const GUID *  id,
ID2D1ResourceTexture **  texture 
)
static

Definition at line 1696 of file effect.c.

1698{
1699 FIXME("iface %p, id %s, texture %p stub!\n", iface, debugstr_guid(id), texture);
1700
1701 return E_NOTIMPL;
1702}

◆ d2d_effect_context_FindVertexBuffer()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindVertexBuffer ( ID2D1EffectContext *  iface,
const GUID *  id,
ID2D1VertexBuffer **  buffer 
)
static

Definition at line 1731 of file effect.c.

1733{
1734 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1735 struct d2d_device_context *context = effect_context->device_context;
1736
1737 TRACE("iface %p, id %s, buffer %p.\n", iface, debugstr_guid(id), buffer);
1738
1739 if (!d2d_device_get_indexed_object(&context->vertex_buffers, id, (IUnknown **)buffer))
1741
1742 return S_OK;
1743}
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define ERROR_NOT_FOUND
Definition: winerror.h:1014

◆ d2d_effect_context_GetDpi()

static void STDMETHODCALLTYPE d2d_effect_context_GetDpi ( ID2D1EffectContext *  iface,
float *  dpi_x,
float *  dpi_y 
)
static

Definition at line 1527 of file effect.c.

1528{
1529 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1530
1531 TRACE("iface %p, dpi_x %p, dpi_y %p.\n", iface, dpi_x, dpi_y);
1532
1533 ID2D1DeviceContext6_GetDpi(&effect_context->device_context->ID2D1DeviceContext6_iface, dpi_x, dpi_y);
1534}

◆ d2d_effect_context_GetMaximumSupportedFeatureLevel()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_GetMaximumSupportedFeatureLevel ( ID2D1EffectContext *  iface,
const D3D_FEATURE_LEVEL *  levels,
UINT32  level_count,
D3D_FEATURE_LEVEL *  max_level 
)
static

Definition at line 1547 of file effect.c.

1549{
1550 FIXME("iface %p, levels %p, level_count %u, max_level %p stub!\n", iface, levels, level_count, max_level);
1551
1552 return E_NOTIMPL;
1553}
GLsizei levels
Definition: glext.h:7884

◆ d2d_effect_context_init()

void d2d_effect_context_init ( struct d2d_effect_context *  effect_context,
struct d2d_device_context *  device_context 
)

Definition at line 1840 of file effect.c.

1841{
1842 effect_context->ID2D1EffectContext_iface.lpVtbl = &d2d_effect_context_vtbl;
1843 effect_context->refcount = 1;
1844 effect_context->device_context = device_context;
1845 ID2D1DeviceContext6_AddRef(&device_context->ID2D1DeviceContext6_iface);
1846}
static const ID2D1EffectContextVtbl d2d_effect_context_vtbl
Definition: effect.c:1812
ID2D1DeviceContext6 ID2D1DeviceContext6_iface
Definition: d2d1_private.h:175
ID2D1EffectContext ID2D1EffectContext_iface
Definition: d2d1_private.h:630

Referenced by d2d_effect_create().

◆ d2d_effect_context_IsBufferPrecisionSupported()

static BOOL STDMETHODCALLTYPE d2d_effect_context_IsBufferPrecisionSupported ( ID2D1EffectContext *  iface,
D2D1_BUFFER_PRECISION  precision 
)
static

Definition at line 1801 of file effect.c.

1803{
1804 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1805
1806 TRACE("iface %p, precision %u.\n", iface, precision);
1807
1808 return ID2D1DeviceContext6_IsBufferPrecisionSupported(&effect_context->device_context->ID2D1DeviceContext6_iface,
1809 precision);
1810}

◆ d2d_effect_context_IsShaderLoaded()

static BOOL STDMETHODCALLTYPE d2d_effect_context_IsShaderLoaded ( ID2D1EffectContext *  iface,
REFGUID  shader_id 
)
static

Definition at line 1676 of file effect.c.

1677{
1678 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1679 struct d2d_device *device = effect_context->device_context->device;
1680
1681 TRACE("iface %p, shader_id %s.\n", iface, debugstr_guid(shader_id));
1682
1683 return d2d_device_get_indexed_object(&device->shaders, shader_id, NULL);
1684}
Definition: devices.h:37

◆ d2d_effect_context_LoadComputeShader()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadComputeShader ( ID2D1EffectContext *  iface,
REFGUID  shader_id,
const BYTE *  buffer,
UINT32  buffer_size 
)
static

Definition at line 1649 of file effect.c.

1651{
1652 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1653 struct d2d_device *device = effect_context->device_context->device;
1654 ID3D11ComputeShader *shader;
1655 HRESULT hr;
1656
1657 TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
1658 iface, debugstr_guid(shader_id), buffer, buffer_size);
1659
1660 if (d2d_device_get_indexed_object(&device->shaders, shader_id, NULL))
1661 return S_OK;
1662
1663 if (FAILED(hr = ID3D11Device1_CreateComputeShader(effect_context->device_context->d3d_device,
1665 {
1666 WARN("Failed to create a compute shader, hr %#lx.\n", hr);
1667 return hr;
1668 }
1669
1670 hr = d2d_device_add_indexed_object(&device->shaders, shader_id, (IUnknown *)shader);
1671 ID3D11ComputeShader_Release(shader);
1672
1673 return hr;
1674}
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95

◆ d2d_effect_context_LoadPixelShader()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadPixelShader ( ID2D1EffectContext *  iface,
REFGUID  shader_id,
const BYTE *  buffer,
UINT32  buffer_size 
)
static

Definition at line 1595 of file effect.c.

1597{
1598 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1599 struct d2d_device *device = effect_context->device_context->device;
1600 ID3D11PixelShader *shader;
1601 HRESULT hr;
1602
1603 TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
1604 iface, debugstr_guid(shader_id), buffer, buffer_size);
1605
1606 if (d2d_device_get_indexed_object(&device->shaders, shader_id, NULL))
1607 return S_OK;
1608
1609 if (FAILED(hr = ID3D11Device1_CreatePixelShader(effect_context->device_context->d3d_device,
1611 {
1612 WARN("Failed to create a pixel shader, hr %#lx.\n", hr);
1613 return hr;
1614 }
1615
1616 hr = d2d_device_add_indexed_object(&device->shaders, shader_id, (IUnknown *)shader);
1617 ID3D11PixelShader_Release(shader);
1618
1619 return hr;
1620}

◆ d2d_effect_context_LoadVertexShader()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadVertexShader ( ID2D1EffectContext *  iface,
REFGUID  shader_id,
const BYTE *  buffer,
UINT32  buffer_size 
)
static

Definition at line 1622 of file effect.c.

1624{
1625 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1626 struct d2d_device *device = effect_context->device_context->device;
1627 ID3D11VertexShader *shader;
1628 HRESULT hr;
1629
1630 TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
1631 iface, debugstr_guid(shader_id), buffer, buffer_size);
1632
1633 if (d2d_device_get_indexed_object(&device->shaders, shader_id, NULL))
1634 return S_OK;
1635
1636 if (FAILED(hr = ID3D11Device1_CreateVertexShader(effect_context->device_context->d3d_device,
1638 {
1639 WARN("Failed to create vertex shader, hr %#lx.\n", hr);
1640 return hr;
1641 }
1642
1643 hr = d2d_device_add_indexed_object(&device->shaders, shader_id, (IUnknown *)shader);
1644 ID3D11VertexShader_Release(shader);
1645
1646 return hr;
1647}

◆ d2d_effect_context_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_effect_context_QueryInterface ( ID2D1EffectContext *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 1483 of file effect.c.

1484{
1485 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
1486
1487 if (IsEqualGUID(iid, &IID_ID2D1EffectContext)
1488 || IsEqualGUID(iid, &IID_IUnknown))
1489 {
1490 ID2D1EffectContext_AddRef(iface);
1491 *out = iface;
1492 return S_OK;
1493 }
1494
1495 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
1496
1497 *out = NULL;
1498 return E_NOINTERFACE;
1499}

◆ d2d_effect_context_Release()

static ULONG STDMETHODCALLTYPE d2d_effect_context_Release ( ID2D1EffectContext *  iface)
static

Definition at line 1511 of file effect.c.

1512{
1513 struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
1514 ULONG refcount = InterlockedDecrement(&effect_context->refcount);
1515
1516 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
1517
1518 if (!refcount)
1519 {
1520 ID2D1DeviceContext6_Release(&effect_context->device_context->ID2D1DeviceContext6_iface);
1521 free(effect_context);
1522 }
1523
1524 return refcount;
1525}

◆ d2d_effect_create()

HRESULT d2d_effect_create ( struct d2d_device_context *  context,
const CLSID *  effect_id,
ID2D1Effect **  effect 
)

Definition at line 2660 of file effect.c.

2662{
2663 struct d2d_effect_context *effect_context;
2664 const struct d2d_effect_registration *reg;
2665 struct d2d_effect *object;
2667 WCHAR clsidW[39];
2668 HRESULT hr;
2669
2671 {
2672 WARN("Effect id %s not found.\n", wine_dbgstr_guid(effect_id));
2674 }
2675
2676 if (!(effect_context = calloc(1, sizeof(*effect_context))))
2677 return E_OUTOFMEMORY;
2679
2680 if (!(object = calloc(1, sizeof(*object))))
2681 {
2682 ID2D1EffectContext_Release(&effect_context->ID2D1EffectContext_iface);
2683 return E_OUTOFMEMORY;
2684 }
2685
2686 object->ID2D1Effect_iface.lpVtbl = &d2d_effect_vtbl;
2687 object->ID2D1Image_iface.lpVtbl = &d2d_effect_image_vtbl;
2688 object->refcount = 1;
2689 object->effect_context = effect_context;
2690
2691 /* Create properties */
2692 d2d_effect_duplicate_properties(object, &object->properties, reg->properties);
2693
2694 StringFromGUID2(effect_id, clsidW, ARRAY_SIZE(clsidW));
2698
2699 /* Sync instance input count with default input count from the description. */
2702
2704 {
2705 ID2D1EffectContext_Release(&effect_context->ID2D1EffectContext_iface);
2706 return hr;
2707 }
2708
2709 if (FAILED(hr = reg->factory((IUnknown **)&object->impl)))
2710 {
2711 WARN("Failed to create implementation object, hr %#lx.\n", hr);
2712 ID2D1Effect_Release(&object->ID2D1Effect_iface);
2713 return hr;
2714 }
2715
2716 if (FAILED(hr = ID2D1EffectImpl_Initialize(object->impl, &effect_context->ID2D1EffectContext_iface,
2717 &object->graph->ID2D1TransformGraph_iface)))
2718 {
2719 WARN("Failed to initialize effect, hr %#lx.\n", hr);
2720 ID2D1Effect_Release(&object->ID2D1Effect_iface);
2721 return hr;
2722 }
2723
2725 {
2726 WARN("Failed to initialize graph nodes, hr %#lx.\n", hr);
2727 ID2D1Effect_Release(&object->ID2D1Effect_iface);
2728 return hr;
2729 }
2730
2731 *effect = &object->ID2D1Effect_iface;
2732
2733 TRACE("Created effect %p.\n", *effect);
2734
2735 return S_OK;
2736}
#define ARRAY_SIZE(A)
Definition: main.h:20
@ D2D1_PROPERTY_CLSID
Definition: d2d1_1.idl:189
@ D2D1_PROPERTY_CACHED
Definition: d2d1_1.idl:195
@ D2D1_PROPERTY_PRECISION
Definition: d2d1_1.idl:196
@ D2D1_PROPERTY_INPUTS
Definition: d2d1_1.idl:194
@ D2D1_PROPERTY_TYPE_CLSID
Definition: d2d1_1.idl:178
@ D2D1_PROPERTY_TYPE_ENUM
Definition: d2d1_1.idl:176
@ D2D1_PROPERTY_TYPE_BOOL
Definition: d2d1_1.idl:167
@ D2D1_PROPERTY_TYPE_ARRAY
Definition: d2d1_1.idl:177
struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *factory, const GUID *effect_id)
Definition: factory.c:66
static HRESULT d2d_effect_get_value(struct d2d_effect *effect, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
Definition: effect.c:2007
void d2d_effect_context_init(struct d2d_effect_context *effect_context, struct d2d_device_context *device_context)
Definition: effect.c:1840
static HRESULT d2d_effect_set_input_count(struct d2d_effect *effect, UINT32 count)
Definition: effect.c:2057
static HRESULT d2d_effect_duplicate_properties(struct d2d_effect *effect, struct d2d_effect_properties *dst, const struct d2d_effect_properties *src)
Definition: effect.c:1293
static HRESULT d2d_effect_transform_graph_initialize_nodes(struct d2d_transform_graph *graph)
Definition: effect.c:2625
HRESULT d2d_effect_properties_add(struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, D2D1_PROPERTY_TYPE type, const WCHAR *value)
Definition: effect.c:1281
static const ID2D1ImageVtbl d2d_effect_image_vtbl
Definition: effect.c:2214
static const ID2D1EffectVtbl d2d_effect_vtbl
Definition: effect.c:2150
static HRESULT d2d_transform_graph_create(UINT32 input_count, struct d2d_transform_graph **graph)
Definition: effect.c:916
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
Definition: combase.c:1525
#define L(x)
Definition: resources.c:13
static int reg
Definition: i386-dis.c:1290
short WCHAR
Definition: pedump.c:58
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:181
uint32_t UINT32
Definition: typedefs.h:59
#define D2DERR_EFFECT_IS_NOT_REGISTERED
Definition: winerror.h:7391
unsigned char BYTE
Definition: xxhash.c:193

Referenced by d2d_device_context_CreateEffect().

◆ d2d_effect_duplicate_properties()

static HRESULT d2d_effect_duplicate_properties ( struct d2d_effect *  effect,
struct d2d_effect_properties *  dst,
const struct d2d_effect_properties *  src 
)
static

Definition at line 1293 of file effect.c.

1295{
1296 HRESULT hr;
1297 size_t i;
1298
1299 *dst = *src;
1300 dst->effect = effect;
1301
1302 if (!(dst->data.ptr = malloc(dst->data.size)))
1303 return E_OUTOFMEMORY;
1304 memcpy(dst->data.ptr, src->data.ptr, dst->data.size);
1305
1306 if (!(dst->properties = calloc(dst->size, sizeof(*dst->properties))))
1307 return E_OUTOFMEMORY;
1308
1309 for (i = 0; i < dst->count; ++i)
1310 {
1311 struct d2d_effect_property *d = &dst->properties[i];
1312 const struct d2d_effect_property *s = &src->properties[i];
1313
1314 *d = *s;
1315 d->name = wcsdup(s->name);
1316 if (d->type == D2D1_PROPERTY_TYPE_STRING)
1317 d->data.ptr = wcsdup((WCHAR *)s->data.ptr);
1318
1319 if (s->subproperties)
1320 {
1321 if (!(d->subproperties = calloc(1, sizeof(*d->subproperties))))
1322 return E_OUTOFMEMORY;
1323 if (FAILED(hr = d2d_effect_duplicate_properties(effect, d->subproperties, s->subproperties)))
1324 return hr;
1325 }
1326 }
1327
1328 return S_OK;
1329}
@ D2D1_PROPERTY_TYPE_STRING
Definition: d2d1_1.idl:166
#define malloc
Definition: debug_ros.c:4
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
GLdouble s
Definition: gl.h:2039
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
#define d
Definition: ke_i.h:81
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
char * name
Definition: wpp.c:52

Referenced by d2d_effect_create(), and d2d_effect_duplicate_properties().

◆ d2d_effect_get_value()

static HRESULT d2d_effect_get_value ( struct d2d_effect *  effect,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2007 of file effect.c.

2009{
2010 return ID2D1Properties_GetValue(&effect->properties.ID2D1Properties_iface, index, type, value, value_size);
2011}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: pdh_main.c:64

Referenced by d2d_effect_create(), d2d_effect_GetValue(), and d2d_effect_SetInputCount().

◆ d2d_effect_GetInput()

static void STDMETHODCALLTYPE d2d_effect_GetInput ( ID2D1Effect *  iface,
UINT32  index,
ID2D1Image **  input 
)
static

Definition at line 2120 of file effect.c.

2121{
2122 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2123
2124 TRACE("iface %p, index %u, input %p.\n", iface, index, input);
2125
2126 if (index < effect->input_count && effect->inputs[index])
2127 ID2D1Image_AddRef(*input = effect->inputs[index]);
2128 else
2129 *input = NULL;
2130}
GLenum GLenum GLenum input
Definition: glext.h:9031

◆ d2d_effect_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount ( ID2D1Effect *  iface)
static

Definition at line 2132 of file effect.c.

2133{
2134 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2135
2136 TRACE("iface %p.\n", iface);
2137
2138 return effect->input_count;
2139}

◆ d2d_effect_GetOutput()

static void STDMETHODCALLTYPE d2d_effect_GetOutput ( ID2D1Effect *  iface,
ID2D1Image **  output 
)
static

Definition at line 2141 of file effect.c.

2142{
2143 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2144
2145 TRACE("iface %p, output %p.\n", iface, output);
2146
2147 ID2D1Image_AddRef(*output = &effect->ID2D1Image_iface);
2148}
ID2D1Image ID2D1Image_iface
Definition: d2d1_private.h:790

◆ d2d_effect_GetPropertyCount()

static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount ( ID2D1Effect *  iface)
static

Definition at line 1925 of file effect.c.

1926{
1927 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1928
1929 TRACE("iface %p.\n", iface);
1930
1931 return ID2D1Properties_GetPropertyCount(&effect->properties.ID2D1Properties_iface);
1932}

◆ d2d_effect_GetPropertyIndex()

static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex ( ID2D1Effect *  iface,
const WCHAR *  name 
)
static

Definition at line 1963 of file effect.c.

1964{
1965 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1966
1967 TRACE("iface %p, name %s.\n", iface, debugstr_w(name));
1968
1969 return ID2D1Properties_GetPropertyIndex(&effect->properties.ID2D1Properties_iface, name);
1970}
Definition: name.c:39

◆ d2d_effect_GetPropertyName()

static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName ( ID2D1Effect *  iface,
UINT32  index,
WCHAR *  name,
UINT32  name_count 
)
static

Definition at line 1934 of file effect.c.

1936{
1937 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1938
1939 TRACE("iface %p, index %u, name %p, name_count %u.\n", iface, index, name, name_count);
1940
1941 return ID2D1Properties_GetPropertyName(&effect->properties.ID2D1Properties_iface,
1942 index, name, name_count);
1943}

◆ d2d_effect_GetPropertyNameLength()

static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength ( ID2D1Effect *  iface,
UINT32  index 
)
static

Definition at line 1945 of file effect.c.

1946{
1947 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1948
1949 TRACE("iface %p, index %u.\n", iface, index);
1950
1951 return ID2D1Properties_GetPropertyNameLength(&effect->properties.ID2D1Properties_iface, index);
1952}

◆ d2d_effect_GetSubProperties()

static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties ( ID2D1Effect *  iface,
UINT32  index,
ID2D1Properties **  props 
)
static

Definition at line 2032 of file effect.c.

2034{
2035 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2036
2037 TRACE("iface %p, index %u, props %p.\n", iface, index, props);
2038
2039 return ID2D1Properties_GetSubProperties(&effect->properties.ID2D1Properties_iface, index, props);
2040}
static const WCHAR props[]
Definition: wbemdisp.c:288

◆ d2d_effect_GetType()

static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType ( ID2D1Effect *  iface,
UINT32  index 
)
static

Definition at line 1954 of file effect.c.

1955{
1956 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1957
1958 TRACE("iface %p, index %#x.\n", iface, index);
1959
1960 return ID2D1Properties_GetType(&effect->properties.ID2D1Properties_iface, index);
1961}

◆ d2d_effect_GetValue()

static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue ( ID2D1Effect *  iface,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2013 of file effect.c.

2015{
2016 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2017
2018 TRACE("iface %p, index %#x, type %u, value %p, value_size %u.\n", iface, index, type, value, value_size);
2019
2020 return d2d_effect_get_value(effect, index, type, value, value_size);
2021}

◆ d2d_effect_GetValueByName()

static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName ( ID2D1Effect *  iface,
const WCHAR *  name,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  value_size 
)
static

Definition at line 1995 of file effect.c.

1997{
1998 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1999
2000 TRACE("iface %p, name %s, type %#x, value %p, value_size %u.\n", iface, debugstr_w(name), type,
2001 value, value_size);
2002
2003 return ID2D1Properties_GetValueByName(&effect->properties.ID2D1Properties_iface, name, type,
2004 value, value_size);
2005}

◆ d2d_effect_GetValueSize()

static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize ( ID2D1Effect *  iface,
UINT32  index 
)
static

Definition at line 2023 of file effect.c.

2024{
2025 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2026
2027 TRACE("iface %p, index %#x.\n", iface, index);
2028
2029 return ID2D1Properties_GetValueSize(&effect->properties.ID2D1Properties_iface, index);
2030}

◆ d2d_effect_image_AddRef()

static ULONG STDMETHODCALLTYPE d2d_effect_image_AddRef ( ID2D1Image *  iface)
static

Definition at line 2187 of file effect.c.

2188{
2189 struct d2d_effect *effect = impl_from_ID2D1Image(iface);
2190
2191 TRACE("iface %p.\n", iface);
2192
2193 return d2d_effect_AddRef(&effect->ID2D1Effect_iface);
2194}
static struct d2d_effect * impl_from_ID2D1Image(ID2D1Image *iface)
Definition: effect.c:2173
static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface)
Definition: effect.c:1899
ID2D1Effect ID2D1Effect_iface
Definition: d2d1_private.h:789

◆ d2d_effect_image_GetFactory()

static void STDMETHODCALLTYPE d2d_effect_image_GetFactory ( ID2D1Image *  iface,
ID2D1Factory **  factory 
)
static

Definition at line 2205 of file effect.c.

2206{
2207 struct d2d_effect *effect = impl_from_ID2D1Image(iface);
2208
2209 TRACE("iface %p, factory %p.\n", iface, factory);
2210
2211 ID2D1Factory_AddRef(*factory = effect->effect_context->device_context->factory);
2212}
Definition: main.c:439

◆ d2d_effect_image_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_effect_image_QueryInterface ( ID2D1Image *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 2178 of file effect.c.

2179{
2180 struct d2d_effect *effect = impl_from_ID2D1Image(iface);
2181
2182 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
2183
2184 return d2d_effect_QueryInterface(&effect->ID2D1Effect_iface, iid, out);
2185}
static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface(ID2D1Effect *iface, REFIID iid, void **out)
Definition: effect.c:1871

◆ d2d_effect_image_Release()

static ULONG STDMETHODCALLTYPE d2d_effect_image_Release ( ID2D1Image *  iface)
static

Definition at line 2196 of file effect.c.

2197{
2198 struct d2d_effect *effect = impl_from_ID2D1Image(iface);
2199
2200 TRACE("iface %p.\n", iface);
2201
2202 return d2d_effect_Release(&effect->ID2D1Effect_iface);
2203}
static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface)
Definition: effect.c:1909

◆ d2d_effect_impl_AddRef()

static ULONG STDMETHODCALLTYPE d2d_effect_impl_AddRef ( ID2D1EffectImpl *  iface)
static

Definition at line 955 of file effect.c.

956{
957 return 2;
958}

◆ d2d_effect_impl_Initialize()

static HRESULT STDMETHODCALLTYPE d2d_effect_impl_Initialize ( ID2D1EffectImpl *  iface,
ID2D1EffectContext *  context,
ID2D1TransformGraph *  graph 
)
static

Definition at line 965 of file effect.c.

967{
968 return S_OK;
969}

◆ d2d_effect_impl_PrepareForRender()

static HRESULT STDMETHODCALLTYPE d2d_effect_impl_PrepareForRender ( ID2D1EffectImpl *  iface,
D2D1_CHANGE_TYPE  type 
)
static

Definition at line 971 of file effect.c.

972{
973 return S_OK;
974}

◆ d2d_effect_impl_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_effect_impl_QueryInterface ( ID2D1EffectImpl *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 939 of file effect.c.

940{
941 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
942
943 if (IsEqualGUID(iid, &IID_ID2D1EffectImpl)
944 || IsEqualGUID(iid, &IID_IUnknown))
945 {
946 ID2D1EffectImpl_AddRef(iface);
947 *out = iface;
948 return S_OK;
949 }
950
951 *out = NULL;
952 return E_NOINTERFACE;
953}

◆ d2d_effect_impl_Release()

static ULONG STDMETHODCALLTYPE d2d_effect_impl_Release ( ID2D1EffectImpl *  iface)
static

Definition at line 960 of file effect.c.

961{
962 return 1;
963}

◆ d2d_effect_impl_SetGraph()

static HRESULT STDMETHODCALLTYPE d2d_effect_impl_SetGraph ( ID2D1EffectImpl *  iface,
ID2D1TransformGraph *  graph 
)
static

Definition at line 976 of file effect.c.

977{
978 return S_OK;
979}

◆ d2d_effect_init_properties()

void d2d_effect_init_properties ( struct d2d_effect *  effect,
struct d2d_effect_properties *  properties 
)

Definition at line 2440 of file effect.c.

2442{
2444 properties->effect = effect;
2445 properties->refcount = 1;
2446}
static const ID2D1PropertiesVtbl d2d_effect_properties_vtbl
Definition: effect.c:2422
ID2D1Properties ID2D1Properties_iface
Definition: d2d1_private.h:658
struct d2d_effect * effect
Definition: d2d1_private.h:660

Referenced by d2d_factory_register_effect_from_stream(), and parse_effect_inputs().

◆ d2d_effect_parse_float_array()

static HRESULT d2d_effect_parse_float_array ( D2D1_PROPERTY_TYPE  type,
const WCHAR *  value,
float *  vec 
)
static

Definition at line 1104 of file effect.c.

1106{
1107 unsigned int i, num_components;
1108 WCHAR *end_ptr;
1109
1110 /* Type values are sequential. */
1111 switch (type)
1112 {
1116 num_components = (type - D2D1_PROPERTY_TYPE_VECTOR2) + 2;
1117 break;
1119 num_components = 6;
1120 break;
1124 num_components = (type - D2D1_PROPERTY_TYPE_MATRIX_4X3) * 4 + 12;
1125 break;
1126 default:
1127 return E_UNEXPECTED;
1128 }
1129
1130 if (*(value++) != '(') return E_INVALIDARG;
1131
1132 for (i = 0; i < num_components; ++i)
1133 {
1134 vec[i] = wcstof(value, &end_ptr);
1135 if (value == end_ptr) return E_INVALIDARG;
1136 value = end_ptr;
1137
1138 /* Trailing characters after last component are ignored. */
1139 if (i == num_components - 1) continue;
1140 if (*(value++) != ',') return E_INVALIDARG;
1141 }
1142
1143 return S_OK;
1144}
@ D2D1_PROPERTY_TYPE_MATRIX_5X4
Definition: d2d1_1.idl:182
@ D2D1_PROPERTY_TYPE_MATRIX_3X2
Definition: d2d1_1.idl:179
@ D2D1_PROPERTY_TYPE_MATRIX_4X4
Definition: d2d1_1.idl:181
@ D2D1_PROPERTY_TYPE_MATRIX_4X3
Definition: d2d1_1.idl:180
@ D2D1_PROPERTY_TYPE_VECTOR2
Definition: d2d1_1.idl:171
@ D2D1_PROPERTY_TYPE_VECTOR3
Definition: d2d1_1.idl:172
@ D2D1_PROPERTY_TYPE_VECTOR4
Definition: d2d1_1.idl:173
_ACRTIMP float __cdecl wcstof(const wchar_t *, wchar_t **)
Definition: strtod.cpp:114
FT_Vector * vec
Definition: ftbbox.c:469
#define E_UNEXPECTED
Definition: winerror.h:3528

Referenced by d2d_effect_properties_internal_add().

◆ d2d_effect_properties_add()

HRESULT d2d_effect_properties_add ( struct d2d_effect_properties *  props,
const WCHAR *  name,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
const WCHAR *  value 
)

Definition at line 1281 of file effect.c.

1283{
1285}
#define FALSE
Definition: types.h:117
static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *props, const WCHAR *name, UINT32 index, BOOL subprop, D2D1_PROPERTY_TYPE type, const WCHAR *value)
Definition: effect.c:1146

Referenced by d2d_effect_create(), parse_effect_inputs(), and parse_effect_property().

◆ d2d_effect_properties_AddRef()

static ULONG STDMETHODCALLTYPE d2d_effect_properties_AddRef ( ID2D1Properties *  iface)
static

Definition at line 2242 of file effect.c.

2243{
2245
2246 if (properties->effect)
2247 return ID2D1Effect_AddRef(&properties->effect->ID2D1Effect_iface);
2248
2249 return InterlockedIncrement(&properties->refcount);
2250}
static struct d2d_effect_properties * impl_from_ID2D1Properties(ID2D1Properties *iface)
Definition: effect.c:2222
struct d2d_effect_property * properties
Definition: d2d1_private.h:662

◆ d2d_effect_properties_cleanup()

void d2d_effect_properties_cleanup ( struct d2d_effect_properties *  props)

Definition at line 1457 of file effect.c.

1458{
1459 struct d2d_effect_property *p;
1460 size_t i;
1461
1462 for (i = 0; i < props->count; ++i)
1463 {
1464 p = &props->properties[i];
1465 free(p->name);
1466 if (p->type == D2D1_PROPERTY_TYPE_STRING)
1467 free(p->data.ptr);
1468 if (p->subproperties)
1469 {
1470 d2d_effect_properties_cleanup(p->subproperties);
1471 free(p->subproperties);
1472 }
1473 }
1474 free(props->properties);
1475 free(props->data.ptr);
1476}
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by d2d_effect_cleanup(), d2d_effect_properties_cleanup(), and d2d_effect_properties_Release().

◆ d2d_effect_properties_get_property_by_index()

static struct d2d_effect_property * d2d_effect_properties_get_property_by_index ( const struct d2d_effect_properties *  properties,
UINT32  index 
)
static

Definition at line 1331 of file effect.c.

1333{
1334 unsigned int i;
1335
1336 for (i = 0; i < properties->count; ++i)
1337 {
1338 if (properties->properties[i].index == index)
1339 return &properties->properties[i];
1340 }
1341
1342 return NULL;
1343}

Referenced by d2d_effect_properties_get_value_size(), d2d_effect_properties_GetPropertyName(), d2d_effect_properties_GetPropertyNameLength(), d2d_effect_properties_GetSubProperties(), d2d_effect_properties_GetType(), d2d_effect_properties_GetValue(), and d2d_effect_properties_SetValue().

◆ d2d_effect_properties_get_property_by_name()

struct d2d_effect_property * d2d_effect_properties_get_property_by_name ( const struct d2d_effect_properties *  properties,
const WCHAR *  name 
)

Definition at line 1345 of file effect.c.

1347{
1348 unsigned int i;
1349
1350 for (i = 0; i < properties->count; ++i)
1351 {
1352 if (!wcscmp(properties->properties[i].name, name))
1353 return &properties->properties[i];
1354 }
1355
1356 return NULL;
1357}
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1977

Referenced by d2d_effect_properties_GetPropertyIndex(), d2d_effect_properties_GetValueByName(), d2d_effect_properties_SetValueByName(), and parse_effect_inputs().

◆ d2d_effect_properties_get_value_size()

static UINT32 d2d_effect_properties_get_value_size ( const struct d2d_effect_properties *  properties,
UINT32  index 
)
static

Definition at line 1359 of file effect.c.

1361{
1362 struct d2d_effect *effect = properties->effect;
1363 struct d2d_effect_property *prop;
1364 UINT32 size;
1365
1366 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
1367 return 0;
1368
1369 if (prop->get_function)
1370 {
1371 if (FAILED(prop->get_function((IUnknown *)effect->impl, NULL, 0, &size))) return 0;
1372 return size;
1373 }
1374
1375 return prop->size;
1376}
static struct d2d_effect_property * d2d_effect_properties_get_property_by_index(const struct d2d_effect_properties *properties, UINT32 index)
Definition: effect.c:1331
PD2D1_PROPERTY_GET_FUNCTION get_function
Definition: d2d1_private.h:652

Referenced by d2d_effect_properties_GetValueSize().

◆ d2d_effect_properties_GetPropertyCount()

static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyCount ( ID2D1Properties *  iface)
static

Definition at line 2271 of file effect.c.

2272{
2274
2275 TRACE("iface %p.\n", iface);
2276
2277 return properties->custom_count;
2278}

◆ d2d_effect_properties_GetPropertyIndex()

static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyIndex ( ID2D1Properties *  iface,
const WCHAR *  name 
)
static

Definition at line 2322 of file effect.c.

2324{
2326 struct d2d_effect_property *prop;
2327
2328 TRACE("iface %p, name %s.\n", iface, debugstr_w(name));
2329
2330 if (!(prop = d2d_effect_properties_get_property_by_name(properties, name)))
2331 return D2D1_INVALID_PROPERTY_INDEX;
2332
2333 return prop->index;
2334}
struct d2d_effect_property * d2d_effect_properties_get_property_by_name(const struct d2d_effect_properties *properties, const WCHAR *name)
Definition: effect.c:1345

◆ d2d_effect_properties_GetPropertyName()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetPropertyName ( ID2D1Properties *  iface,
UINT32  index,
WCHAR *  name,
UINT32  name_count 
)
static

Definition at line 2280 of file effect.c.

2282{
2284 struct d2d_effect_property *prop;
2285
2286 TRACE("iface %p, index %u, name %p, name_count %u.\n", iface, index, name, name_count);
2287
2288 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2290
2291 return d2d_effect_return_string(prop->name, name, name_count);
2292}
static HRESULT d2d_effect_return_string(const WCHAR *str, WCHAR *buffer, UINT32 buffer_size)
Definition: effect.c:1378
#define D2DERR_INVALID_PROPERTY
Definition: winerror.h:7392

◆ d2d_effect_properties_GetPropertyNameLength()

static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyNameLength ( ID2D1Properties *  iface,
UINT32  index 
)
static

Definition at line 2294 of file effect.c.

2296{
2298 struct d2d_effect_property *prop;
2299
2300 TRACE("iface %p, index %u.\n", iface, index);
2301
2302 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2304
2305 return wcslen(prop->name);
2306}
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988

◆ d2d_effect_properties_GetSubProperties()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetSubProperties ( ID2D1Properties *  iface,
UINT32  index,
ID2D1Properties **  props 
)
static

Definition at line 2404 of file effect.c.

2406{
2408 struct d2d_effect_property *prop;
2409
2410 TRACE("iface %p, index %u, props %p.\n", iface, index, props);
2411
2412 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2414
2415 if (!prop->subproperties) return D2DERR_NO_SUBPROPERTIES;
2416
2417 *props = &prop->subproperties->ID2D1Properties_iface;
2418 ID2D1Properties_AddRef(*props);
2419 return S_OK;
2420}
struct d2d_effect_properties * subproperties
Definition: d2d1_private.h:653
#define D2DERR_NO_SUBPROPERTIES
Definition: winerror.h:7393

◆ d2d_effect_properties_GetType()

static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_properties_GetType ( ID2D1Properties *  iface,
UINT32  index 
)
static

Definition at line 2308 of file effect.c.

2310{
2312 struct d2d_effect_property *prop;
2313
2314 TRACE("iface %p, index %#x.\n", iface, index);
2315
2316 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2318
2319 return prop->type;
2320}
@ D2D1_PROPERTY_TYPE_UNKNOWN
Definition: d2d1_1.idl:165
D2D1_PROPERTY_TYPE type
Definition: d2d1_private.h:642

◆ d2d_effect_properties_GetValue()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValue ( ID2D1Properties *  iface,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2380 of file effect.c.

2382{
2384 struct d2d_effect_property *prop;
2385
2386 TRACE("iface %p, index %#x, type %u, value %p, value_size %u.\n", iface, index, type, value, value_size);
2387
2388 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2390
2391 return d2d_effect_property_get_value(properties, prop, type, value, value_size);
2392}
static HRESULT d2d_effect_property_get_value(const struct d2d_effect_properties *properties, const struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 size)
Definition: effect.c:1387

◆ d2d_effect_properties_GetValueByName()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValueByName ( ID2D1Properties *  iface,
const WCHAR *  name,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2365 of file effect.c.

2367{
2369 struct d2d_effect_property *prop;
2370
2371 TRACE("iface %p, name %s, type %#x, value %p, value_size %u.\n", iface, debugstr_w(name), type,
2372 value, value_size);
2373
2374 if (!(prop = d2d_effect_properties_get_property_by_name(properties, name)))
2376
2377 return d2d_effect_property_get_value(properties, prop, type, value, value_size);
2378}

◆ d2d_effect_properties_GetValueSize()

static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetValueSize ( ID2D1Properties *  iface,
UINT32  index 
)
static

Definition at line 2394 of file effect.c.

2396{
2398
2399 TRACE("iface %p, index %#x.\n", iface, index);
2400
2402}
static UINT32 d2d_effect_properties_get_value_size(const struct d2d_effect_properties *properties, UINT32 index)
Definition: effect.c:1359

◆ d2d_effect_properties_internal_add()

static HRESULT d2d_effect_properties_internal_add ( struct d2d_effect_properties *  props,
const WCHAR *  name,
UINT32  index,
BOOL  subprop,
D2D1_PROPERTY_TYPE  type,
const WCHAR *  value 
)
static

Definition at line 1146 of file effect.c.

1148{
1149 static const UINT32 sizes[] =
1150 {
1153 [D2D1_PROPERTY_TYPE_BOOL] = sizeof(BOOL),
1155 [D2D1_PROPERTY_TYPE_INT32] = sizeof(INT32),
1156 [D2D1_PROPERTY_TYPE_FLOAT] = sizeof(float),
1162 [D2D1_PROPERTY_TYPE_ENUM] = sizeof(UINT32),
1163 [D2D1_PROPERTY_TYPE_ARRAY] = sizeof(UINT32),
1164 [D2D1_PROPERTY_TYPE_CLSID] = sizeof(CLSID),
1170 };
1171 struct d2d_effect_property *p;
1172 HRESULT hr;
1173
1175
1176 if (!d2d_array_reserve((void **)&props->properties, &props->size, props->count + 1,
1177 sizeof(*props->properties)))
1178 {
1179 return E_OUTOFMEMORY;
1180 }
1181
1182 /* TODO: we could save some space for properties that have both getter and setter. */
1183 if (!d2d_array_reserve((void **)&props->data.ptr, &props->data.size,
1184 props->data.count + sizes[type], sizeof(*props->data.ptr)))
1185 {
1186 return E_OUTOFMEMORY;
1187 }
1188 props->data.count += sizes[type];
1189
1190 p = &props->properties[props->count++];
1191 memset(p, 0, sizeof(*p));
1192 p->index = index;
1193 if (p->index < 0x80000000)
1194 {
1195 props->custom_count++;
1196 /* FIXME: this should probably be controlled by subproperty */
1197 p->readonly = FALSE;
1198 }
1199 else if (subprop)
1200 p->readonly = TRUE;
1201 else
1203 p->name = wcsdup(name);
1204 p->type = type;
1205 if (p->type == D2D1_PROPERTY_TYPE_STRING)
1206 {
1207 p->data.ptr = wcsdup(value);
1208 p->size = value ? (wcslen(value) + 1) * sizeof(WCHAR) : sizeof(WCHAR);
1209 }
1210 else if (p->type == D2D1_PROPERTY_TYPE_BLOB)
1211 {
1212 p->data.ptr = NULL;
1213 p->size = 0;
1214 }
1215 else
1216 {
1217 void *src = NULL;
1218 UINT32 _uint32;
1219 float _vec[20];
1220 CLSID _clsid;
1221 BOOL _bool;
1222
1223 p->data.offset = props->offset;
1224 p->size = sizes[type];
1225 props->offset += p->size;
1226
1227 if (value)
1228 {
1229 switch (p->type)
1230 {
1233 _uint32 = wcstoul(value, NULL, 0);
1234 src = &_uint32;
1235 break;
1237 _uint32 = wcstoul(value, NULL, 10);
1238 src = &_uint32;
1239 break;
1241 if (!wcscmp(value, L"true")) _bool = TRUE;
1242 else if (!wcscmp(value, L"false")) _bool = FALSE;
1243 else return E_INVALIDARG;
1244 src = &_bool;
1245 break;
1247 CLSIDFromString(value, &_clsid);
1248 src = &_clsid;
1249 break;
1257 if (FAILED(hr = d2d_effect_parse_float_array(p->type, value, _vec)))
1258 {
1259 WARN("Failed to parse float array %s for type %u.\n",
1260 wine_dbgstr_w(value), p->type);
1261 return hr;
1262 }
1263 src = _vec;
1264 break;
1267 break;
1268 default:
1269 FIXME("Initial value for property type %u is not handled.\n", p->type);
1270 }
1271
1272 if (src && p->size) memcpy(props->data.ptr + p->data.offset, src, p->size);
1273 }
1274 else if (p->size)
1275 memset(props->data.ptr + p->data.offset, 0, p->size);
1276 }
1277
1278 return S_OK;
1279}
#define index(s, c)
Definition: various.h:29
@ D2D1_PROPERTY_TYPE_BLOB
Definition: d2d1_1.idl:174
@ D2D1_PROPERTY_TYPE_UINT32
Definition: d2d1_1.idl:168
@ D2D1_PROPERTY_TYPE_FLOAT
Definition: d2d1_1.idl:170
@ D2D1_PROPERTY_TYPE_IUNKNOWN
Definition: d2d1_1.idl:175
@ D2D1_PROPERTY_TYPE_INT32
Definition: d2d1_1.idl:169
@ D2D1_PROPERTY_TYPE_COLOR_CONTEXT
Definition: d2d1_1.idl:183
static BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
Definition: d2d1_private.h:897
#define TRUE
Definition: types.h:120
static HRESULT d2d_effect_parse_float_array(D2D1_PROPERTY_TYPE type, const WCHAR *value, float *vec)
Definition: effect.c:1104
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
Definition: combase.c:1470
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2917
unsigned int BOOL
Definition: ntddk_ex.h:94
#define wine_dbgstr_w
Definition: kernel32.h:34
static const struct @662 sizes[]
IID CLSID
Definition: mstsclib_i.c:62
#define BOOL
Definition: nt_native.h:43
#define memset(x, y, z)
Definition: compat.h:39
int32_t INT32
Definition: typedefs.h:58
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by d2d_effect_properties_add(), and d2d_effect_subproperties_add().

◆ d2d_effect_properties_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_QueryInterface ( ID2D1Properties *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 2227 of file effect.c.

2229{
2230 if (IsEqualGUID(riid, &IID_ID2D1Properties) ||
2232 {
2233 *obj = iface;
2234 ID2D1Properties_AddRef(iface);
2235 return S_OK;
2236 }
2237
2238 *obj = NULL;
2239 return E_NOINTERFACE;
2240}
REFIID riid
Definition: atlbase.h:39

◆ d2d_effect_properties_Release()

static ULONG STDMETHODCALLTYPE d2d_effect_properties_Release ( ID2D1Properties *  iface)
static

Definition at line 2252 of file effect.c.

2253{
2256
2257 if (properties->effect)
2258 return ID2D1Effect_Release(&properties->effect->ID2D1Effect_iface);
2259
2261
2262 if (!refcount)
2263 {
2266 }
2267
2268 return refcount;
2269}

◆ d2d_effect_properties_SetValue()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValue ( ID2D1Properties *  iface,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
const BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2351 of file effect.c.

2353{
2355 struct d2d_effect_property *prop;
2356
2357 TRACE("iface %p, index %#x, type %u, value %p, value_size %u.\n", iface, index, type, value, value_size);
2358
2359 if (!(prop = d2d_effect_properties_get_property_by_index(properties, index)))
2361
2362 return d2d_effect_property_set_value(properties, prop, type, value, value_size);
2363}
static HRESULT d2d_effect_property_set_value(struct d2d_effect_properties *properties, struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size)
Definition: effect.c:1429

◆ d2d_effect_properties_SetValueByName()

static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValueByName ( ID2D1Properties *  iface,
const WCHAR *  name,
D2D1_PROPERTY_TYPE  type,
const BYTE *  value,
UINT32  value_size 
)
static

Definition at line 2336 of file effect.c.

2338{
2340 struct d2d_effect_property *prop;
2341
2342 TRACE("iface %p, name %s, type %u, value %p, value_size %u.\n", iface, debugstr_w(name),
2343 type, value, value_size);
2344
2345 if (!(prop = d2d_effect_properties_get_property_by_name(properties, name)))
2347
2348 return d2d_effect_property_set_value(properties, prop, type, value, value_size);
2349}

◆ d2d_effect_property_get_uint32_value()

HRESULT d2d_effect_property_get_uint32_value ( const struct d2d_effect_properties *  properties,
const struct d2d_effect_property *  prop,
UINT32 *  value 
)

Definition at line 1422 of file effect.c.

1424{
1426 (BYTE *)value, sizeof(*value));
1427}

Referenced by parse_effect_inputs().

◆ d2d_effect_property_get_value()

static HRESULT d2d_effect_property_get_value ( const struct d2d_effect_properties *  properties,
const struct d2d_effect_property *  prop,
D2D1_PROPERTY_TYPE  type,
BYTE *  value,
UINT32  size 
)
static

Definition at line 1387 of file effect.c.

1389{
1390 struct d2d_effect *effect = properties->effect;
1391 UINT32 actual_size;
1392
1393 memset(value, 0, size);
1394
1395 if (type != D2D1_PROPERTY_TYPE_UNKNOWN && prop->type != type) return E_INVALIDARG;
1396 /* Do not check sizes for variable-length properties. */
1397 if (prop->type != D2D1_PROPERTY_TYPE_STRING
1398 && prop->type != D2D1_PROPERTY_TYPE_BLOB
1399 && prop->size != size)
1400 {
1401 return E_INVALIDARG;
1402 }
1403
1404 if (prop->get_function)
1405 return prop->get_function((IUnknown *)effect->impl, value, size, &actual_size);
1406
1407 switch (prop->type)
1408 {
1410 memset(value, 0, size);
1411 break;
1413 return d2d_effect_return_string(prop->data.ptr, (WCHAR *)value, size / sizeof(WCHAR));
1414 default:
1415 memcpy(value, properties->data.ptr + prop->data.offset, size);
1416 break;
1417 }
1418
1419 return S_OK;
1420}
union d2d_effect_property::@250 data

Referenced by d2d_effect_properties_GetValue(), d2d_effect_properties_GetValueByName(), and d2d_effect_property_get_uint32_value().

◆ d2d_effect_property_set_value()

static HRESULT d2d_effect_property_set_value ( struct d2d_effect_properties *  properties,
struct d2d_effect_property *  prop,
D2D1_PROPERTY_TYPE  type,
const BYTE *  value,
UINT32  size 
)
static

Definition at line 1429 of file effect.c.

1431{
1432 struct d2d_effect *effect = properties->effect;
1433 if (prop->readonly || !effect) return E_INVALIDARG;
1434 if (type != D2D1_PROPERTY_TYPE_UNKNOWN && prop->type != type) return E_INVALIDARG;
1435 if (prop->get_function && !prop->set_function) return E_INVALIDARG;
1436 if (prop->index < 0x80000000 && !prop->set_function) return E_INVALIDARG;
1437
1438 if (prop->set_function)
1439 return prop->set_function((IUnknown *)effect->impl, value, size);
1440
1441 if (prop->size != size) return E_INVALIDARG;
1442
1443 switch (prop->type)
1444 {
1448 memcpy(properties->data.ptr + prop->data.offset, value, size);
1449 break;
1450 default:
1451 FIXME("Unhandled type %u.\n", prop->type);
1452 }
1453
1454 return S_OK;
1455}
PD2D1_PROPERTY_SET_FUNCTION set_function
Definition: d2d1_private.h:651

Referenced by d2d_effect_properties_SetValue(), and d2d_effect_properties_SetValueByName().

◆ d2d_effect_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface ( ID2D1Effect *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 1871 of file effect.c.

1872{
1873 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1874 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
1875
1876 if (IsEqualGUID(iid, &IID_ID2D1Effect)
1877 || IsEqualGUID(iid, &IID_ID2D1Properties)
1878 || IsEqualGUID(iid, &IID_IUnknown))
1879 {
1880 ID2D1Effect_AddRef(iface);
1881 *out = iface;
1882 return S_OK;
1883 }
1884
1885 if (IsEqualGUID(iid, &IID_ID2D1Image)
1886 || IsEqualGUID(iid, &IID_ID2D1Resource))
1887 {
1888 ID2D1Image_AddRef(&effect->ID2D1Image_iface);
1889 *out = &effect->ID2D1Image_iface;
1890 return S_OK;
1891 }
1892
1893 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
1894
1895 *out = NULL;
1896 return E_NOINTERFACE;
1897}

Referenced by d2d_effect_image_QueryInterface().

◆ d2d_effect_Release()

static ULONG STDMETHODCALLTYPE d2d_effect_Release ( ID2D1Effect *  iface)
static

Definition at line 1909 of file effect.c.

1910{
1911 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1913
1914 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
1915
1916 if (!refcount)
1917 {
1918 d2d_effect_cleanup(effect);
1919 free(effect);
1920 }
1921
1922 return refcount;
1923}
static void d2d_effect_cleanup(struct d2d_effect *effect)
Definition: effect.c:1853

Referenced by d2d_effect_image_Release().

◆ d2d_effect_render_info_create()

static HRESULT d2d_effect_render_info_create ( struct d2d_render_info **  obj)
static

Definition at line 2587 of file effect.c.

2588{
2589 struct d2d_render_info *object;
2590
2591 if (!(object = calloc(1, sizeof(*object))))
2592 return E_OUTOFMEMORY;
2593
2594 object->ID2D1DrawInfo_iface.lpVtbl = &d2d_draw_info_vtbl;
2595 object->refcount = 1;
2596
2597 *obj = object;
2598
2599 return S_OK;
2600}
static const ID2D1DrawInfoVtbl d2d_draw_info_vtbl
Definition: effect.c:2571

Referenced by d2d_effect_transform_graph_initialize_nodes().

◆ d2d_effect_return_string()

static HRESULT d2d_effect_return_string ( const WCHAR *  str,
WCHAR *  buffer,
UINT32  buffer_size 
)
static

Definition at line 1378 of file effect.c.

1379{
1380 UINT32 size = str ? wcslen(str) : 0;
1382 if (str) memcpy(buffer, str, (size + 1) * sizeof(*buffer));
1383 else *buffer = 0;
1384 return S_OK;
1385}
#define D2DERR_INSUFFICIENT_BUFFER
Definition: d2derr.h:23
const WCHAR * str

Referenced by d2d_effect_properties_GetPropertyName(), and d2d_effect_property_get_value().

◆ d2d_effect_set_input_count()

static HRESULT d2d_effect_set_input_count ( struct d2d_effect *  effect,
UINT32  count 
)
static

Definition at line 2057 of file effect.c.

2058{
2059 bool initialized = effect->inputs != NULL;
2060 HRESULT hr = S_OK;
2061 unsigned int i;
2062
2063 if (count == effect->input_count)
2064 return S_OK;
2065
2066 if (count < effect->input_count)
2067 {
2068 for (i = count; i < effect->input_count; ++i)
2069 {
2070 if (effect->inputs[i])
2071 ID2D1Image_Release(effect->inputs[i]);
2072 }
2073 }
2074 else
2075 {
2076 if (!d2d_array_reserve((void **)&effect->inputs, &effect->inputs_size,
2077 count, sizeof(*effect->inputs)))
2078 {
2079 ERR("Failed to resize inputs array.\n");
2080 return E_OUTOFMEMORY;
2081 }
2082
2083 memset(&effect->inputs[effect->input_count], 0, sizeof(*effect->inputs) * (count - effect->input_count));
2084 }
2085 effect->input_count = count;
2086
2087 if (initialized)
2088 {
2089 ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface);
2090 effect->graph = NULL;
2091
2093 {
2094 if (FAILED(hr = ID2D1EffectImpl_SetGraph(effect->impl, &effect->graph->ID2D1TransformGraph_iface)))
2095 WARN("Failed to set a new transform graph, hr %#lx.\n", hr);
2096 }
2097 }
2098
2099 return hr;
2100}
#define ERR(fmt,...)
Definition: precomp.h:57
size_t inputs_size
Definition: d2d1_private.h:798
static BOOL initialized
Definition: syslog.c:39

Referenced by d2d_effect_create(), and d2d_effect_SetInputCount().

◆ d2d_effect_SetInput()

static void STDMETHODCALLTYPE d2d_effect_SetInput ( ID2D1Effect *  iface,
UINT32  index,
ID2D1Image *  input,
BOOL  invalidate 
)
static

Definition at line 2042 of file effect.c.

2043{
2044 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2045
2046 TRACE("iface %p, index %u, input %p, invalidate %#x.\n", iface, index, input, invalidate);
2047
2048 if (index >= effect->input_count)
2049 return;
2050
2051 ID2D1Image_AddRef(input);
2052 if (effect->inputs[index])
2053 ID2D1Image_Release(effect->inputs[index]);
2054 effect->inputs[index] = input;
2055}
static void invalidate()

◆ d2d_effect_SetInputCount()

static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount ( ID2D1Effect *  iface,
UINT32  count 
)
static

Definition at line 2102 of file effect.c.

2103{
2104 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
2105 unsigned int min_inputs, max_inputs;
2106
2107 TRACE("iface %p, count %u.\n", iface, count);
2108
2110 (BYTE *)&min_inputs, sizeof(min_inputs));
2112 (BYTE *)&max_inputs, sizeof(max_inputs));
2113
2114 if (count < min_inputs || count > max_inputs)
2115 return E_INVALIDARG;
2116
2117 return d2d_effect_set_input_count(effect, count);
2118}
@ D2D1_PROPERTY_MAX_INPUTS
Definition: d2d1_1.idl:198
@ D2D1_PROPERTY_MIN_INPUTS
Definition: d2d1_1.idl:197

◆ d2d_effect_SetValue()

static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue ( ID2D1Effect *  iface,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
const BYTE *  value,
UINT32  value_size 
)
static

Definition at line 1984 of file effect.c.

1986{
1987 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1988
1989 TRACE("iface %p, index %#x, type %u, value %p, value_size %u.\n", iface, index, type, value, value_size);
1990
1991 return ID2D1Properties_SetValue(&effect->properties.ID2D1Properties_iface, index, type,
1992 value, value_size);
1993}

◆ d2d_effect_SetValueByName()

static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName ( ID2D1Effect *  iface,
const WCHAR *  name,
D2D1_PROPERTY_TYPE  type,
const BYTE *  value,
UINT32  value_size 
)
static

Definition at line 1972 of file effect.c.

1974{
1975 struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
1976
1977 TRACE("iface %p, name %s, type %u, value %p, value_size %u.\n", iface, debugstr_w(name),
1978 type, value, value_size);
1979
1980 return ID2D1Properties_SetValueByName(&effect->properties.ID2D1Properties_iface, name,
1981 type, value, value_size);
1982}

◆ d2d_effect_subproperties_add()

HRESULT d2d_effect_subproperties_add ( struct d2d_effect_properties *  props,
const WCHAR *  name,
UINT32  index,
D2D1_PROPERTY_TYPE  type,
const WCHAR *  value 
)

Definition at line 1287 of file effect.c.

Referenced by parse_effect_inputs().

◆ d2d_effect_transform_graph_initialize_nodes()

static HRESULT d2d_effect_transform_graph_initialize_nodes ( struct d2d_transform_graph *  graph)
static

Definition at line 2625 of file effect.c.

2626{
2627 ID2D1DrawTransform *draw_transform;
2628 struct d2d_transform_node *node;
2629 HRESULT hr;
2630
2632 {
2634 {
2635 if (FAILED(hr = d2d_effect_render_info_create(&node->render_info)))
2636 return hr;
2637 }
2638
2639 if (SUCCEEDED(ID2D1TransformNode_QueryInterface(node->object, &IID_ID2D1DrawTransform,
2640 (void **)&draw_transform)))
2641 {
2642 hr = ID2D1DrawTransform_SetDrawInfo(draw_transform, &node->render_info->ID2D1DrawInfo_iface);
2643 ID2D1DrawTransform_Release(draw_transform);
2644 if (FAILED(hr))
2645 {
2646 WARN("Failed to set draw info, hr %#lx.\n", hr);
2647 return hr;
2648 }
2649 }
2650 else
2651 {
2652 FIXME("Unsupported node %p.\n", node);
2653 return E_NOTIMPL;
2654 }
2655 }
2656
2657 return S_OK;
2658}
static bool d2d_transform_node_needs_render_info(const struct d2d_transform_node *node)
Definition: effect.c:2602
static HRESULT d2d_effect_render_info_create(struct d2d_render_info **obj)
Definition: effect.c:2587
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
Definition: graph.c:32

Referenced by d2d_effect_create().

◆ d2d_effects_init_builtins()

void d2d_effects_init_builtins ( struct d2d_factory *  factory)

Definition at line 1074 of file effect.c.

1075{
1076 static const struct builtin_description
1077 {
1078 const CLSID *clsid;
1079 const WCHAR *description;
1080 }
1081 builtin_effects[] =
1082 {
1083 { &CLSID_D2D12DAffineTransform, _2d_affine_transform_description },
1084 { &CLSID_D2D13DPerspectiveTransform, _3d_perspective_transform_description},
1085 { &CLSID_D2D1Composite, composite_description },
1086 { &CLSID_D2D1Crop, crop_description },
1087 { &CLSID_D2D1Shadow, shadow_description },
1088 { &CLSID_D2D1Grayscale, grayscale_description },
1089 };
1090 unsigned int i;
1091 HRESULT hr;
1092
1093 for (i = 0; i < ARRAY_SIZE(builtin_effects); ++i)
1094 {
1095 if (FAILED(hr = d2d_factory_register_builtin_effect(factory, builtin_effects[i].clsid, builtin_effects[i].description,
1097 {
1098 WARN("Failed to register the effect %s, hr %#lx.\n", wine_dbgstr_guid(builtin_effects[i].clsid), hr);
1099 }
1100 }
1101}
HRESULT d2d_factory_register_builtin_effect(struct d2d_factory *factory, REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings, UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
Definition: factory.c:1081
static const WCHAR _2d_affine_transform_description[]
Definition: effect.c:1000
static const WCHAR _3d_perspective_transform_description[]
Definition: effect.c:1012
static const WCHAR grayscale_description[]
Definition: effect.c:1062
static const WCHAR shadow_description[]
Definition: effect.c:1050
static HRESULT STDMETHODCALLTYPE builtin_factory_stub(IUnknown **effect_impl)
Definition: effect.c:991
static const WCHAR composite_description[]
Definition: effect.c:1024
static const WCHAR crop_description[]
Definition: effect.c:1037

Referenced by d2d_factory_builtins_initonce().

◆ d2d_offset_transform_AddRef()

static ULONG STDMETHODCALLTYPE d2d_offset_transform_AddRef ( ID2D1OffsetTransform *  iface)
static

Definition at line 147 of file effect.c.

148{
151
152 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
153
154 return refcount;
155}
static struct d2d_transform * impl_from_ID2D1OffsetTransform(ID2D1OffsetTransform *iface)
Definition: effect.c:23

◆ d2d_offset_transform_create()

static HRESULT d2d_offset_transform_create ( D2D1_POINT_2L  offset,
ID2D1OffsetTransform **  transform 
)
static

Definition at line 208 of file effect.c.

209{
210 struct d2d_transform *object;
211
212 if (!(object = calloc(1, sizeof(*object))))
213 return E_OUTOFMEMORY;
214
215 object->ID2D1TransformNode_iface.lpVtbl = (ID2D1TransformNodeVtbl *)&d2d_offset_transform_vtbl;
216 object->refcount = 1;
217 object->offset = offset;
218
219 *transform = (ID2D1OffsetTransform *)&object->ID2D1TransformNode_iface;
220
221 return S_OK;
222}
static const ID2D1OffsetTransformVtbl d2d_offset_transform_vtbl
Definition: effect.c:198

Referenced by d2d_effect_context_CreateOffsetTransform().

◆ d2d_offset_transform_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_offset_transform_GetInputCount ( ID2D1OffsetTransform *  iface)
static

Definition at line 170 of file effect.c.

171{
172 TRACE("iface %p.\n", iface);
173
174 return 1;
175}

◆ d2d_offset_transform_GetOffset()

static D2D1_POINT_2L *STDMETHODCALLTYPE d2d_offset_transform_GetOffset ( ID2D1OffsetTransform *  iface,
D2D1_POINT_2L *  offset 
)
static

Definition at line 187 of file effect.c.

189{
191
192 TRACE("iface %p.\n", iface);
193
194 *offset = transform->offset;
195 return offset;
196}

◆ d2d_offset_transform_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_offset_transform_QueryInterface ( ID2D1OffsetTransform *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 128 of file effect.c.

130{
131 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
132
133 if (IsEqualGUID(iid, &IID_ID2D1OffsetTransform)
134 || IsEqualGUID(iid, &IID_ID2D1TransformNode)
135 || IsEqualGUID(iid, &IID_IUnknown))
136 {
137 *out = iface;
138 ID2D1OffsetTransform_AddRef(iface);
139 return S_OK;
140 }
141
142 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
143 *out = NULL;
144 return E_NOINTERFACE;
145}

◆ d2d_offset_transform_Release()

static ULONG STDMETHODCALLTYPE d2d_offset_transform_Release ( ID2D1OffsetTransform *  iface)
static

Definition at line 157 of file effect.c.

158{
161
162 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
163
164 if (!refcount)
166
167 return refcount;
168}

◆ d2d_offset_transform_SetOffset()

static void STDMETHODCALLTYPE d2d_offset_transform_SetOffset ( ID2D1OffsetTransform *  iface,
D2D1_POINT_2L  offset 
)
static

Definition at line 177 of file effect.c.

179{
181
182 TRACE("iface %p, offset %s.\n", iface, debug_d2d_point_2l(&offset));
183
184 transform->offset = offset;
185}

◆ d2d_transform_graph_add_node()

static HRESULT d2d_transform_graph_add_node ( struct d2d_transform_graph *  graph,
ID2D1TransformNode *  object 
)
static

Definition at line 616 of file effect.c.

618{
619 struct d2d_transform_node *node;
620
621 if (!(node = calloc(1, sizeof(*node))))
622 return E_OUTOFMEMORY;
623 node->input_count = ID2D1TransformNode_GetInputCount(object);
624 if (!(node->inputs = calloc(node->input_count, sizeof(*node->inputs))))
625 {
626 free(node);
627 return E_OUTOFMEMORY;
628 }
629
630 node->object = object;
631 ID2D1TransformNode_AddRef(node->object);
632 list_add_tail(&graph->nodes, &node->entry);
633
634 return S_OK;
635}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
ID2D1TransformNode * object
Definition: d2d1_private.h:758

Referenced by d2d_transform_graph_AddNode(), and d2d_transform_graph_SetSingleTransformNode().

◆ d2d_transform_graph_AddNode()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_AddNode ( ID2D1TransformGraph *  iface,
ID2D1TransformNode *  object 
)
static

Definition at line 779 of file effect.c.

781{
783
784 TRACE("iface %p, object %p.\n", iface, object);
785
787 return E_INVALIDARG;
788
789 return d2d_transform_graph_add_node(graph, object);
790}
static struct d2d_transform_node * d2d_transform_graph_get_node(const struct d2d_transform_graph *graph, ID2D1TransformNode *object)
Definition: effect.c:602
static HRESULT d2d_transform_graph_add_node(struct d2d_transform_graph *graph, ID2D1TransformNode *object)
Definition: effect.c:616
static struct d2d_transform_graph * impl_from_ID2D1TransformGraph(ID2D1TransformGraph *iface)
Definition: effect.c:692

◆ d2d_transform_graph_AddRef()

static ULONG STDMETHODCALLTYPE d2d_transform_graph_AddRef ( ID2D1TransformGraph *  iface)
static

Definition at line 713 of file effect.c.

714{
717
718 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
719
720 return refcount;
721}
LONG refcount
Definition: amstream.c:2173

◆ d2d_transform_graph_Clear()

static void STDMETHODCALLTYPE d2d_transform_graph_Clear ( ID2D1TransformGraph *  iface)
static

Definition at line 874 of file effect.c.

875{
877
878 TRACE("iface %p.\n", iface);
879
881}
static void d2d_transform_graph_clear(struct d2d_transform_graph *graph)
Definition: effect.c:681

◆ d2d_transform_graph_clear()

static void d2d_transform_graph_clear ( struct d2d_transform_graph *  graph)
static

Definition at line 681 of file effect.c.

682{
683 struct d2d_transform_node *node, *node_next;
684
685 LIST_FOR_EACH_ENTRY_SAFE(node, node_next, &graph->nodes, struct d2d_transform_node, entry)
686 {
688 }
689 graph->passthrough = false;
690}
static void d2d_transform_graph_delete_node(struct d2d_transform_graph *graph, struct d2d_transform_node *node)
Definition: effect.c:655
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:242

Referenced by d2d_transform_graph_Clear(), d2d_transform_graph_Release(), d2d_transform_graph_SetPassthroughGraph(), and d2d_transform_graph_SetSingleTransformNode().

◆ d2d_transform_graph_ConnectNode()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode ( ID2D1TransformGraph *  iface,
ID2D1TransformNode *  from_node,
ID2D1TransformNode *  to_node,
UINT32  index 
)
static

Definition at line 824 of file effect.c.

826{
828 struct d2d_transform_node *from, *to;
829
830 TRACE("iface %p, from_node %p, to_node %p, index %u.\n", iface, from_node, to_node, index);
831
832 if (!(from = d2d_transform_graph_get_node(graph, from_node)))
834
835 if (!(to = d2d_transform_graph_get_node(graph, to_node)))
837
838 if (index >= to->input_count)
839 return E_INVALIDARG;
840
842 to->inputs[index] = from;
843 from->output = to;
844
845 return S_OK;
846}
static void d2d_transform_node_disconnect(struct d2d_transform_node *node)
Definition: effect.c:637
CardRegion * from
Definition: spigame.cpp:19
struct d2d_transform_node ** inputs
Definition: d2d1_private.h:760
unsigned int input_count
Definition: d2d1_private.h:761

◆ d2d_transform_graph_ConnectToEffectInput()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectToEffectInput ( ID2D1TransformGraph *  iface,
UINT32  input_index,
ID2D1TransformNode *  object,
UINT32  node_index 
)
static

Definition at line 848 of file effect.c.

850{
852 struct d2d_transform_node *node;
853 unsigned int count;
854
855 TRACE("iface %p, input_index %u, object %p, node_index %u.\n", iface, input_index, object, node_index);
856
857 if (!(node = d2d_transform_graph_get_node(graph, object)))
859
860 if (input_index >= graph->input_count)
861 return E_INVALIDARG;
862
863 count = ID2D1TransformNode_GetInputCount(object);
864 if (node_index >= count)
865 return E_INVALIDARG;
866
867 graph->inputs[input_index].node = node;
868 graph->inputs[input_index].index = node_index;
869 graph->passthrough = false;
870
871 return S_OK;
872}

◆ d2d_transform_graph_create()

static HRESULT d2d_transform_graph_create ( UINT32  input_count,
struct d2d_transform_graph **  graph 
)
static

Definition at line 916 of file effect.c.

917{
919
920 if (!(object = calloc(1, sizeof(*object))))
921 return E_OUTOFMEMORY;
922
923 object->ID2D1TransformGraph_iface.lpVtbl = &d2d_transform_graph_vtbl;
924 object->refcount = 1;
925 list_init(&object->nodes);
926
927 if (!(object->inputs = calloc(input_count, sizeof(*object->inputs))))
928 {
929 free(object);
930 return E_OUTOFMEMORY;
931 }
932 object->input_count = input_count;
933
934 *graph = object;
935
936 return S_OK;
937}
static void list_init(struct list_entry *head)
Definition: list.h:51
static const ID2D1TransformGraphVtbl d2d_transform_graph_vtbl
Definition: effect.c:900
unsigned int input_count
Definition: d2d1_private.h:777

Referenced by d2d_effect_create(), and d2d_effect_set_input_count().

◆ d2d_transform_graph_delete_node()

static void d2d_transform_graph_delete_node ( struct d2d_transform_graph *  graph,
struct d2d_transform_node *  node 
)
static

Definition at line 655 of file effect.c.

657{
658 unsigned int i;
659
660 list_remove(&node->entry);
661 ID2D1TransformNode_Release(node->object);
662
663 for (i = 0; i < graph->input_count; ++i)
664 {
665 if (graph->inputs[i].node == node)
666 memset(&graph->inputs[i].node, 0, sizeof(graph->inputs[i].node));
667 }
668
669 if (graph->output == node)
670 graph->output = NULL;
671
672 if (node->render_info)
673 ID2D1DrawInfo_Release(&node->render_info->ID2D1DrawInfo_iface);
674
676
677 free(node->inputs);
678 free(node);
679}
static void list_remove(struct list_entry *entry)
Definition: list.h:90

Referenced by d2d_transform_graph_clear(), and d2d_transform_graph_RemoveNode().

◆ d2d_transform_graph_get_node()

static struct d2d_transform_node * d2d_transform_graph_get_node ( const struct d2d_transform_graph *  graph,
ID2D1TransformNode *  object 
)
static

◆ d2d_transform_graph_GetInputCount()

static UINT32 STDMETHODCALLTYPE d2d_transform_graph_GetInputCount ( ID2D1TransformGraph *  iface)
static

Definition at line 740 of file effect.c.

741{
743
744 TRACE("iface %p.\n", iface);
745
746 return graph->input_count;
747}

◆ d2d_transform_graph_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_QueryInterface ( ID2D1TransformGraph *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 697 of file effect.c.

698{
699 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
700
701 if (IsEqualGUID(iid, &IID_ID2D1TransformGraph)
702 || IsEqualGUID(iid, &IID_IUnknown))
703 {
704 ID2D1TransformGraph_AddRef(iface);
705 *out = iface;
706 return S_OK;
707 }
708
709 *out = NULL;
710 return E_NOINTERFACE;
711}

◆ d2d_transform_graph_Release()

static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release ( ID2D1TransformGraph *  iface)
static

Definition at line 723 of file effect.c.

724{
727
728 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
729
730 if (!refcount)
731 {
733 free(graph->inputs);
734 free(graph);
735 }
736
737 return refcount;
738}

◆ d2d_transform_graph_RemoveNode()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_RemoveNode ( ID2D1TransformGraph *  iface,
ID2D1TransformNode *  object 
)
static

Definition at line 792 of file effect.c.

794{
796 struct d2d_transform_node *node;
797
798 TRACE("iface %p, object %p.\n", iface, object);
799
800 if (!(node = d2d_transform_graph_get_node(graph, object)))
802
804 return S_OK;
805}

◆ d2d_transform_graph_SetOutputNode()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetOutputNode ( ID2D1TransformGraph *  iface,
ID2D1TransformNode *  object 
)
static

Definition at line 807 of file effect.c.

809{
811 struct d2d_transform_node *node;
812
813 TRACE("iface %p, object %p.\n", iface, object);
814
815 if (!(node = d2d_transform_graph_get_node(graph, object)))
817
818 graph->output = node;
819 graph->passthrough = false;
820
821 return S_OK;
822}

◆ d2d_transform_graph_SetPassthroughGraph()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetPassthroughGraph ( ID2D1TransformGraph *  iface,
UINT32  index 
)
static

Definition at line 883 of file effect.c.

884{
886
887 TRACE("iface %p, index %u.\n", iface, index);
888
889 if (index >= graph->input_count)
890 return E_INVALIDARG;
891
893
894 graph->passthrough = true;
895 graph->passthrough_input = index;
896
897 return S_OK;
898}

◆ d2d_transform_graph_SetSingleTransformNode()

static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetSingleTransformNode ( ID2D1TransformGraph *  iface,
ID2D1TransformNode *  object 
)
static

Definition at line 749 of file effect.c.

751{
753 struct d2d_transform_node *node;
754 unsigned int i, input_count;
755 HRESULT hr;
756
757 TRACE("iface %p, object %p.\n", iface, object);
758
761 return hr;
762
764 graph->output = node;
765
766 input_count = ID2D1TransformNode_GetInputCount(object);
767 if (graph->input_count != input_count)
768 return E_INVALIDARG;
769
770 for (i = 0; i < graph->input_count; ++i)
771 {
772 graph->inputs[i].node = node;
773 graph->inputs[i].index = i;
774 }
775
776 return S_OK;
777}

◆ d2d_transform_node_disconnect()

static void d2d_transform_node_disconnect ( struct d2d_transform_node *  node)
static

Definition at line 637 of file effect.c.

638{
639 struct d2d_transform_node *output = node->output;
640 unsigned int i;
641
642 if (!output)
643 return;
644
645 for (i = 0; i < output->input_count; ++i)
646 {
647 if (output->inputs[i] == node)
648 {
649 output->inputs[i] = NULL;
650 break;
651 }
652 }
653}
struct d2d_transform_node * output
Definition: d2d1_private.h:762

Referenced by d2d_transform_graph_ConnectNode(), and d2d_transform_graph_delete_node().

◆ d2d_transform_node_needs_render_info()

static bool d2d_transform_node_needs_render_info ( const struct d2d_transform_node *  node)
static

Definition at line 2602 of file effect.c.

2603{
2604 static const GUID *iids[] =
2605 {
2606 &IID_ID2D1SourceTransform,
2607 &IID_ID2D1ComputeTransform,
2608 &IID_ID2D1DrawTransform,
2609 };
2610 unsigned int i;
2611 IUnknown *obj;
2612
2613 for (i = 0; i < ARRAY_SIZE(iids); ++i)
2614 {
2615 if (SUCCEEDED(ID2D1TransformNode_QueryInterface(node->object, iids[i], (void **)&obj)))
2616 {
2617 IUnknown_Release(obj);
2618 return true;
2619 }
2620 }
2621
2622 return false;
2623}

Referenced by d2d_effect_transform_graph_initialize_nodes().

◆ d2d_vertex_buffer_AddRef()

static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_AddRef ( ID2D1VertexBuffer *  iface)
static

Definition at line 67 of file effect.c.

68{
71
72 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
73
74 return refcount;
75}
static struct d2d_vertex_buffer * impl_from_ID2D1VertexBuffer(ID2D1VertexBuffer *iface)
Definition: effect.c:44

◆ d2d_vertex_buffer_create()

static HRESULT d2d_vertex_buffer_create ( ID2D1VertexBuffer **  buffer)
static

Definition at line 113 of file effect.c.

114{
116
117 if (!(object = calloc(1, sizeof(*object))))
118 return E_OUTOFMEMORY;
119
120 object->ID2D1VertexBuffer_iface.lpVtbl = &d2d_vertex_buffer_vtbl;
121 object->refcount = 1;
122
123 *buffer = &object->ID2D1VertexBuffer_iface;
124
125 return S_OK;
126}
static const ID2D1VertexBufferVtbl d2d_vertex_buffer_vtbl
Definition: effect.c:104

Referenced by d2d_effect_context_CreateVertexBuffer().

◆ d2d_vertex_buffer_Map()

static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Map ( ID2D1VertexBuffer *  iface,
BYTE **  data,
UINT32  size 
)
static

Definition at line 90 of file effect.c.

91{
92 FIXME("iface %p, data %p, size %u.\n", iface, data, size);
93
94 return E_NOTIMPL;
95}

◆ d2d_vertex_buffer_QueryInterface()

static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_QueryInterface ( ID2D1VertexBuffer *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 49 of file effect.c.

51{
52 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
53
54 if (IsEqualGUID(iid, &IID_ID2D1VertexBuffer)
55 || IsEqualGUID(iid, &IID_IUnknown))
56 {
57 *out = iface;
58 ID2D1VertexBuffer_AddRef(iface);
59 return S_OK;
60 }
61
62 WARN("Unsupported interface %s.\n", debugstr_guid(iid));
63 *out = NULL;
64 return E_NOINTERFACE;
65}

◆ d2d_vertex_buffer_Release()

static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_Release ( ID2D1VertexBuffer *  iface)
static

Definition at line 77 of file effect.c.

78{
81
82 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
83
84 if (!refcount)
85 free(buffer);
86
87 return refcount;
88}

◆ d2d_vertex_buffer_Unmap()

static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Unmap ( ID2D1VertexBuffer *  iface)
static

Definition at line 97 of file effect.c.

98{
99 FIXME("iface %p.\n", iface);
100
101 return E_NOTIMPL;
102}

◆ impl_from_ID2D1BlendTransform()

static struct d2d_transform * impl_from_ID2D1BlendTransform ( ID2D1BlendTransform *  iface)
inlinestatic

Definition at line 28 of file effect.c.

29{
30 return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface);
31}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by d2d_blend_transform_AddRef(), d2d_blend_transform_GetDescription(), d2d_blend_transform_GetInputCount(), d2d_blend_transform_Release(), and d2d_blend_transform_SetDescription().

◆ impl_from_ID2D1BorderTransform()

static struct d2d_transform * impl_from_ID2D1BorderTransform ( ID2D1BorderTransform *  iface)
inlinestatic

◆ impl_from_ID2D1BoundsAdjustmentTransform()

static struct d2d_transform * impl_from_ID2D1BoundsAdjustmentTransform ( ID2D1BoundsAdjustmentTransform *  iface)
inlinestatic

◆ impl_from_ID2D1DrawInfo()

static struct d2d_render_info * impl_from_ID2D1DrawInfo ( ID2D1DrawInfo *  iface)
static

Definition at line 2448 of file effect.c.

2449{
2450 return CONTAINING_RECORD(iface, struct d2d_render_info, ID2D1DrawInfo_iface);
2451}

Referenced by d2d_draw_info_AddRef(), d2d_draw_info_Release(), and d2d_draw_info_SetPixelShader().

◆ impl_from_ID2D1Effect()

◆ impl_from_ID2D1EffectContext()

◆ impl_from_ID2D1Image()

static struct d2d_effect * impl_from_ID2D1Image ( ID2D1Image *  iface)
inlinestatic

Definition at line 2173 of file effect.c.

2174{
2175 return CONTAINING_RECORD(iface, struct d2d_effect, ID2D1Image_iface);
2176}

Referenced by d2d_effect_image_AddRef(), d2d_effect_image_GetFactory(), d2d_effect_image_QueryInterface(), and d2d_effect_image_Release().

◆ impl_from_ID2D1OffsetTransform()

static struct d2d_transform * impl_from_ID2D1OffsetTransform ( ID2D1OffsetTransform *  iface)
inlinestatic

Definition at line 23 of file effect.c.

24{
25 return CONTAINING_RECORD(iface, struct d2d_transform, ID2D1TransformNode_iface);
26}

Referenced by d2d_offset_transform_AddRef(), d2d_offset_transform_GetOffset(), d2d_offset_transform_Release(), and d2d_offset_transform_SetOffset().

◆ impl_from_ID2D1Properties()

◆ impl_from_ID2D1TransformGraph()

◆ impl_from_ID2D1VertexBuffer()

static struct d2d_vertex_buffer * impl_from_ID2D1VertexBuffer ( ID2D1VertexBuffer *  iface)
inlinestatic

Definition at line 44 of file effect.c.

45{
46 return CONTAINING_RECORD(iface, struct d2d_vertex_buffer, ID2D1VertexBuffer_iface);
47}

Referenced by d2d_vertex_buffer_AddRef(), and d2d_vertex_buffer_Release().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d2d  )

Variable Documentation

◆ _2d_affine_transform_description

const WCHAR _2d_affine_transform_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='2D Affine Transform'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='2D Affine Transform'/> \
<Inputs> \
<Input name='Source'/> \
</Inputs> \
</Effect>"

Definition at line 1000 of file effect.c.

Referenced by d2d_effects_init_builtins().

◆ _3d_perspective_transform_description

const WCHAR _3d_perspective_transform_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='3D Perspective Transform'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='3D Perspective Transform'/> \
<Inputs> \
<Input name='Source'/> \
</Inputs> \
</Effect>"

Definition at line 1012 of file effect.c.

Referenced by d2d_effects_init_builtins().

◆ composite_description

const WCHAR composite_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Composite'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Composite'/> \
<Inputs minimum='1' maximum='0xffffffff' > \
<Input name='Source1'/> \
<Input name='Source2'/> \
</Inputs> \
</Effect>"

Definition at line 1024 of file effect.c.

Referenced by d2d_effects_init_builtins().

◆ crop_description

const WCHAR crop_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Crop'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Crop'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
<Property name='Rect' type='vector4' /> \
</Effect>"

Definition at line 1037 of file effect.c.

Referenced by d2d_effects_init_builtins().

◆ d2d_blend_transform_vtbl

const ID2D1BlendTransformVtbl d2d_blend_transform_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d2d_blend_transform_GetDescription(ID2D1BlendTransform *iface, D2D1_BLEND_DESCRIPTION *description)
Definition: effect.c:300
static void STDMETHODCALLTYPE d2d_blend_transform_SetCached(ID2D1BlendTransform *iface, BOOL is_cached)
Definition: effect.c:284
static UINT32 STDMETHODCALLTYPE d2d_blend_transform_GetInputCount(ID2D1BlendTransform *iface)
Definition: effect.c:267
static HRESULT STDMETHODCALLTYPE d2d_blend_transform_SetOutputBuffer(ID2D1BlendTransform *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
Definition: effect.c:276
static ULONG STDMETHODCALLTYPE d2d_blend_transform_AddRef(ID2D1BlendTransform *iface)
Definition: effect.c:244
static HRESULT STDMETHODCALLTYPE d2d_blend_transform_QueryInterface(ID2D1BlendTransform *iface, REFIID iid, void **out)
Definition: effect.c:224
static void STDMETHODCALLTYPE d2d_blend_transform_SetDescription(ID2D1BlendTransform *iface, const D2D1_BLEND_DESCRIPTION *description)
Definition: effect.c:290
static ULONG STDMETHODCALLTYPE d2d_blend_transform_Release(ID2D1BlendTransform *iface)
Definition: effect.c:254

Definition at line 310 of file effect.c.

Referenced by d2d_blend_transform_create().

◆ d2d_border_transform_vtbl

const ID2D1BorderTransformVtbl d2d_border_transform_vtbl
static
Initial value:
=
{
}
static ULONG STDMETHODCALLTYPE d2d_border_transform_Release(ID2D1BorderTransform *iface)
Definition: effect.c:375
static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeX(ID2D1BorderTransform *iface, D2D1_EXTEND_MODE mode)
Definition: effect.c:409
static HRESULT STDMETHODCALLTYPE d2d_border_transform_SetOutputBuffer(ID2D1BorderTransform *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
Definition: effect.c:395
static void STDMETHODCALLTYPE d2d_border_transform_SetExtendModeY(ID2D1BorderTransform *iface, D2D1_EXTEND_MODE mode)
Definition: effect.c:428
static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeX(ID2D1BorderTransform *iface)
Definition: effect.c:447
static UINT32 STDMETHODCALLTYPE d2d_border_transform_GetInputCount(ID2D1BorderTransform *iface)
Definition: effect.c:388
static HRESULT STDMETHODCALLTYPE d2d_border_transform_QueryInterface(ID2D1BorderTransform *iface, REFIID iid, void **out)
Definition: effect.c:345
static D2D1_EXTEND_MODE STDMETHODCALLTYPE d2d_border_transform_GetExtendModeY(ID2D1BorderTransform *iface)
Definition: effect.c:457
static void STDMETHODCALLTYPE d2d_border_transform_SetCached(ID2D1BorderTransform *iface, BOOL is_cached)
Definition: effect.c:403
static ULONG STDMETHODCALLTYPE d2d_border_transform_AddRef(ID2D1BorderTransform *iface)
Definition: effect.c:365

Definition at line 467 of file effect.c.

Referenced by d2d_border_transform_create().

◆ d2d_bounds_adjustment_transform_vtbl

const ID2D1BoundsAdjustmentTransformVtbl d2d_bounds_adjustment_transform_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetOutputBounds(ID2D1BoundsAdjustmentTransform *iface, D2D1_RECT_L *bounds)
Definition: effect.c:563
static HRESULT STDMETHODCALLTYPE d2d_bounds_adjustment_transform_QueryInterface(ID2D1BoundsAdjustmentTransform *iface, REFIID iid, void **out)
Definition: effect.c:501
static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_AddRef(ID2D1BoundsAdjustmentTransform *iface)
Definition: effect.c:520
static ULONG STDMETHODCALLTYPE d2d_bounds_adjustment_transform_Release(ID2D1BoundsAdjustmentTransform *iface)
Definition: effect.c:531
static UINT32 STDMETHODCALLTYPE d2d_bounds_adjustment_transform_GetInputCount(ID2D1BoundsAdjustmentTransform *iface)
Definition: effect.c:545
static void STDMETHODCALLTYPE d2d_bounds_adjustment_transform_SetOutputBounds(ID2D1BoundsAdjustmentTransform *iface, const D2D1_RECT_L *bounds)
Definition: effect.c:553

Definition at line 573 of file effect.c.

Referenced by d2d_bounds_adjustment_transform_create().

◆ d2d_draw_info_vtbl

const ID2D1DrawInfoVtbl d2d_draw_info_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetResourceTexture(ID2D1DrawInfo *iface, UINT32 index, ID2D1ResourceTexture *texture)
Definition: effect.c:2532
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexShaderConstantBuffer(ID2D1DrawInfo *iface, const BYTE *buffer, UINT32 size)
Definition: effect.c:2540
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetOutputBuffer(ID2D1DrawInfo *iface, D2D1_BUFFER_PRECISION precision, D2D1_CHANNEL_DEPTH depth)
Definition: effect.c:2505
static void STDMETHODCALLTYPE d2d_draw_info_SetInstructionCountHint(ID2D1DrawInfo *iface, UINT32 count)
Definition: effect.c:2518
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetInputDescription(ID2D1DrawInfo *iface, UINT32 index, D2D1_INPUT_DESCRIPTION description)
Definition: effect.c:2497
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShaderConstantBuffer(ID2D1DrawInfo *iface, const BYTE *buffer, UINT32 size)
Definition: effect.c:2524
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetVertexProcessing(ID2D1DrawInfo *iface, ID2D1VertexBuffer *buffer, D2D1_VERTEX_OPTIONS options, const D2D1_BLEND_DESCRIPTION *description, const D2D1_VERTEX_RANGE *range, const GUID *shader)
Definition: effect.c:2560
static HRESULT STDMETHODCALLTYPE d2d_draw_info_QueryInterface(ID2D1DrawInfo *iface, REFIID iid, void **obj)
Definition: effect.c:2453
static ULONG STDMETHODCALLTYPE d2d_draw_info_AddRef(ID2D1DrawInfo *iface)
Definition: effect.c:2474
static HRESULT STDMETHODCALLTYPE d2d_draw_info_SetPixelShader(ID2D1DrawInfo *iface, REFGUID id, D2D1_PIXEL_OPTIONS options)
Definition: effect.c:2548
static void STDMETHODCALLTYPE d2d_draw_info_SetCached(ID2D1DrawInfo *iface, BOOL is_cached)
Definition: effect.c:2513
static ULONG STDMETHODCALLTYPE d2d_draw_info_Release(ID2D1DrawInfo *iface)
Definition: effect.c:2484

Definition at line 2571 of file effect.c.

Referenced by d2d_effect_render_info_create().

◆ d2d_effect_context_vtbl

const ID2D1EffectContextVtbl d2d_effect_context_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateResourceTexture(ID2D1EffectContext *iface, const GUID *id, const D2D1_RESOURCE_TEXTURE_PROPERTIES *texture_properties, const BYTE *data, const UINT32 *strides, UINT32 data_size, ID2D1ResourceTexture **texture)
Definition: effect.c:1686
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CheckFeatureSupport(ID2D1EffectContext *iface, D2D1_FEATURE feature, void *data, UINT32 data_size)
Definition: effect.c:1779
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateVertexBuffer(ID2D1EffectContext *iface, const D2D1_VERTEX_BUFFER_PROPERTIES *buffer_properties, const GUID *id, const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *custom_buffer_properties, ID2D1VertexBuffer **buffer)
Definition: effect.c:1704
static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindVertexBuffer(ID2D1EffectContext *iface, const GUID *id, ID2D1VertexBuffer **buffer)
Definition: effect.c:1731
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadVertexShader(ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
Definition: effect.c:1622
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBlendTransform(ID2D1EffectContext *iface, UINT32 num_inputs, const D2D1_BLEND_DESCRIPTION *description, ID2D1BlendTransform **transform)
Definition: effect.c:1563
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadComputeShader(ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
Definition: effect.c:1649
static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *iface)
Definition: effect.c:1511
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateOffsetTransform(ID2D1EffectContext *iface, D2D1_POINT_2L offset, ID2D1OffsetTransform **transform)
Definition: effect.c:1579
static HRESULT STDMETHODCALLTYPE d2d_effect_context_QueryInterface(ID2D1EffectContext *iface, REFIID iid, void **out)
Definition: effect.c:1483
static ULONG STDMETHODCALLTYPE d2d_effect_context_AddRef(ID2D1EffectContext *iface)
Definition: effect.c:1501
static BOOL STDMETHODCALLTYPE d2d_effect_context_IsBufferPrecisionSupported(ID2D1EffectContext *iface, D2D1_BUFFER_PRECISION precision)
Definition: effect.c:1801
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBoundsAdjustmentTransform(ID2D1EffectContext *iface, const D2D1_RECT_L *output_rect, ID2D1BoundsAdjustmentTransform **transform)
Definition: effect.c:1587
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContext(ID2D1EffectContext *iface, D2D1_COLOR_SPACE space, const BYTE *profile, UINT32 profile_size, ID2D1ColorContext **color_context)
Definition: effect.c:1745
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect(ID2D1EffectContext *iface, REFCLSID clsid, ID2D1Effect **effect)
Definition: effect.c:1536
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBorderTransform(ID2D1EffectContext *iface, D2D1_EXTEND_MODE mode_x, D2D1_EXTEND_MODE mode_y, ID2D1BorderTransform **transform)
Definition: effect.c:1571
static HRESULT STDMETHODCALLTYPE d2d_effect_context_FindResourceTexture(ID2D1EffectContext *iface, const GUID *id, ID2D1ResourceTexture **texture)
Definition: effect.c:1696
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateTransformNodeFromEffect(ID2D1EffectContext *iface, ID2D1Effect *effect, ID2D1TransformNode **node)
Definition: effect.c:1555
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromWicColorContext(ID2D1EffectContext *iface, IWICColorContext *wic_color_context, ID2D1ColorContext **color_context)
Definition: effect.c:1768
static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadPixelShader(ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size)
Definition: effect.c:1595
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromFilename(ID2D1EffectContext *iface, const WCHAR *filename, ID2D1ColorContext **color_context)
Definition: effect.c:1757
static HRESULT STDMETHODCALLTYPE d2d_effect_context_GetMaximumSupportedFeatureLevel(ID2D1EffectContext *iface, const D3D_FEATURE_LEVEL *levels, UINT32 level_count, D3D_FEATURE_LEVEL *max_level)
Definition: effect.c:1547
static BOOL STDMETHODCALLTYPE d2d_effect_context_IsShaderLoaded(ID2D1EffectContext *iface, REFGUID shader_id)
Definition: effect.c:1676
static void STDMETHODCALLTYPE d2d_effect_context_GetDpi(ID2D1EffectContext *iface, float *dpi_x, float *dpi_y)
Definition: effect.c:1527

Definition at line 1812 of file effect.c.

Referenced by d2d_effect_context_init().

◆ d2d_effect_image_vtbl

const ID2D1ImageVtbl d2d_effect_image_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_effect_image_QueryInterface(ID2D1Image *iface, REFIID iid, void **out)
Definition: effect.c:2178
static void STDMETHODCALLTYPE d2d_effect_image_GetFactory(ID2D1Image *iface, ID2D1Factory **factory)
Definition: effect.c:2205
static ULONG STDMETHODCALLTYPE d2d_effect_image_AddRef(ID2D1Image *iface)
Definition: effect.c:2187
static ULONG STDMETHODCALLTYPE d2d_effect_image_Release(ID2D1Image *iface)
Definition: effect.c:2196

Definition at line 2214 of file effect.c.

Referenced by d2d_effect_create().

◆ d2d_effect_impl_vtbl

const ID2D1EffectImplVtbl d2d_effect_impl_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_QueryInterface(ID2D1EffectImpl *iface, REFIID iid, void **out)
Definition: effect.c:939
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_SetGraph(ID2D1EffectImpl *iface, ID2D1TransformGraph *graph)
Definition: effect.c:976
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_PrepareForRender(ID2D1EffectImpl *iface, D2D1_CHANGE_TYPE type)
Definition: effect.c:971
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_Initialize(ID2D1EffectImpl *iface, ID2D1EffectContext *context, ID2D1TransformGraph *graph)
Definition: effect.c:965
static ULONG STDMETHODCALLTYPE d2d_effect_impl_Release(ID2D1EffectImpl *iface)
Definition: effect.c:960
static ULONG STDMETHODCALLTYPE d2d_effect_impl_AddRef(ID2D1EffectImpl *iface)
Definition: effect.c:955

Definition at line 981 of file effect.c.

Referenced by builtin_factory_stub().

◆ d2d_effect_properties_vtbl

const ID2D1PropertiesVtbl d2d_effect_properties_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValueByName(ID2D1Properties *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
Definition: effect.c:2365
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyCount(ID2D1Properties *iface)
Definition: effect.c:2271
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetValueSize(ID2D1Properties *iface, UINT32 index)
Definition: effect.c:2394
static ULONG STDMETHODCALLTYPE d2d_effect_properties_Release(ID2D1Properties *iface)
Definition: effect.c:2252
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetValue(ID2D1Properties *iface, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
Definition: effect.c:2380
static ULONG STDMETHODCALLTYPE d2d_effect_properties_AddRef(ID2D1Properties *iface)
Definition: effect.c:2242
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetSubProperties(ID2D1Properties *iface, UINT32 index, ID2D1Properties **props)
Definition: effect.c:2404
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValueByName(ID2D1Properties *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
Definition: effect.c:2336
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyNameLength(ID2D1Properties *iface, UINT32 index)
Definition: effect.c:2294
static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_properties_GetType(ID2D1Properties *iface, UINT32 index)
Definition: effect.c:2308
static UINT32 STDMETHODCALLTYPE d2d_effect_properties_GetPropertyIndex(ID2D1Properties *iface, const WCHAR *name)
Definition: effect.c:2322
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_GetPropertyName(ID2D1Properties *iface, UINT32 index, WCHAR *name, UINT32 name_count)
Definition: effect.c:2280
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_QueryInterface(ID2D1Properties *iface, REFIID riid, void **obj)
Definition: effect.c:2227
static HRESULT STDMETHODCALLTYPE d2d_effect_properties_SetValue(ID2D1Properties *iface, UINT32 index, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
Definition: effect.c:2351

Definition at line 2422 of file effect.c.

Referenced by d2d_effect_init_properties().

◆ d2d_effect_vtbl

const ID2D1EffectVtbl d2d_effect_vtbl
static
Initial value:
=
{
}
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex(ID2D1Effect *iface, const WCHAR *name)
Definition: effect.c:1963
static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
Definition: effect.c:2013
static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
Definition: effect.c:2102
static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName(ID2D1Effect *iface, UINT32 index, WCHAR *name, UINT32 name_count)
Definition: effect.c:1934
static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index)
Definition: effect.c:2023
static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties(ID2D1Effect *iface, UINT32 index, ID2D1Properties **props)
Definition: effect.c:2032
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength(ID2D1Effect *iface, UINT32 index)
Definition: effect.c:1945
static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
Definition: effect.c:2120
static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType(ID2D1Effect *iface, UINT32 index)
Definition: effect.c:1954
static void STDMETHODCALLTYPE d2d_effect_GetOutput(ID2D1Effect *iface, ID2D1Image **output)
Definition: effect.c:2141
static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount(ID2D1Effect *iface)
Definition: effect.c:2132
static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image *input, BOOL invalidate)
Definition: effect.c:2042
static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size)
Definition: effect.c:1995
static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount(ID2D1Effect *iface)
Definition: effect.c:1925
static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
Definition: effect.c:1984
static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName(ID2D1Effect *iface, const WCHAR *name, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size)
Definition: effect.c:1972

Definition at line 2150 of file effect.c.

Referenced by d2d_effect_create().

◆ d2d_offset_transform_vtbl

const ID2D1OffsetTransformVtbl d2d_offset_transform_vtbl
static
Initial value:
=
{
}
static UINT32 STDMETHODCALLTYPE d2d_offset_transform_GetInputCount(ID2D1OffsetTransform *iface)
Definition: effect.c:170
static ULONG STDMETHODCALLTYPE d2d_offset_transform_AddRef(ID2D1OffsetTransform *iface)
Definition: effect.c:147
static D2D1_POINT_2L *STDMETHODCALLTYPE d2d_offset_transform_GetOffset(ID2D1OffsetTransform *iface, D2D1_POINT_2L *offset)
Definition: effect.c:187
static HRESULT STDMETHODCALLTYPE d2d_offset_transform_QueryInterface(ID2D1OffsetTransform *iface, REFIID iid, void **out)
Definition: effect.c:128
static void STDMETHODCALLTYPE d2d_offset_transform_SetOffset(ID2D1OffsetTransform *iface, D2D1_POINT_2L offset)
Definition: effect.c:177
static ULONG STDMETHODCALLTYPE d2d_offset_transform_Release(ID2D1OffsetTransform *iface)
Definition: effect.c:157

Definition at line 198 of file effect.c.

Referenced by d2d_offset_transform_create().

◆ d2d_transform_graph_vtbl

const ID2D1TransformGraphVtbl d2d_transform_graph_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_RemoveNode(ID2D1TransformGraph *iface, ID2D1TransformNode *object)
Definition: effect.c:792
static UINT32 STDMETHODCALLTYPE d2d_transform_graph_GetInputCount(ID2D1TransformGraph *iface)
Definition: effect.c:740
static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release(ID2D1TransformGraph *iface)
Definition: effect.c:723
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetSingleTransformNode(ID2D1TransformGraph *iface, ID2D1TransformNode *object)
Definition: effect.c:749
static ULONG STDMETHODCALLTYPE d2d_transform_graph_AddRef(ID2D1TransformGraph *iface)
Definition: effect.c:713
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetOutputNode(ID2D1TransformGraph *iface, ID2D1TransformNode *object)
Definition: effect.c:807
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_QueryInterface(ID2D1TransformGraph *iface, REFIID iid, void **out)
Definition: effect.c:697
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetPassthroughGraph(ID2D1TransformGraph *iface, UINT32 index)
Definition: effect.c:883
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_AddNode(ID2D1TransformGraph *iface, ID2D1TransformNode *object)
Definition: effect.c:779
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode(ID2D1TransformGraph *iface, ID2D1TransformNode *from_node, ID2D1TransformNode *to_node, UINT32 index)
Definition: effect.c:824
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectToEffectInput(ID2D1TransformGraph *iface, UINT32 input_index, ID2D1TransformNode *object, UINT32 node_index)
Definition: effect.c:848
static void STDMETHODCALLTYPE d2d_transform_graph_Clear(ID2D1TransformGraph *iface)
Definition: effect.c:874

Definition at line 900 of file effect.c.

Referenced by d2d_transform_graph_create().

◆ d2d_vertex_buffer_vtbl

const ID2D1VertexBufferVtbl d2d_vertex_buffer_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_QueryInterface(ID2D1VertexBuffer *iface, REFIID iid, void **out)
Definition: effect.c:49
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Map(ID2D1VertexBuffer *iface, BYTE **data, UINT32 size)
Definition: effect.c:90
static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_AddRef(ID2D1VertexBuffer *iface)
Definition: effect.c:67
static ULONG STDMETHODCALLTYPE d2d_vertex_buffer_Release(ID2D1VertexBuffer *iface)
Definition: effect.c:77
static HRESULT STDMETHODCALLTYPE d2d_vertex_buffer_Unmap(ID2D1VertexBuffer *iface)
Definition: effect.c:97

Definition at line 104 of file effect.c.

Referenced by d2d_vertex_buffer_create().

◆ grayscale_description

const WCHAR grayscale_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Grayscale'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Grayscale'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
</Effect>"

Definition at line 1062 of file effect.c.

Referenced by d2d_effects_init_builtins().

◆ shadow_description

const WCHAR shadow_description[]
static
Initial value:
=
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Shadow'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Shadow'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
</Effect>"

Definition at line 1050 of file effect.c.

Referenced by d2d_effects_init_builtins().