ID2D1DeviceContext::GetEffectRequiredInputRectangles method

Gets the maximum region of each specified input which would be used during a subsequent rendering operation. This method returns the rectangles of effect inputs which Direct2D will use for a certain rendering operation. In cases when the app re-renders the effect inputs to bitmap during each frame, you can use this API to minimize unnecessary rendering on the part of the app.

Syntax


HRESULT GetEffectRequiredInputRectangles(
  [in]                                 ID2D1Effect *renderEffect,
  [in, optional]                       const D2D1_RECT_F *renderImageRectangle,
  [in, size_is(inputCount), optional]  const D2D1_EFFECT_INPUT_DESCRIPTION *inputDescriptions,
  [out, size_is(inputCount)]           D2D1_RECT_F  *requiredInputRects,
  UINT32 inputCount
);

Parameters

renderEffect [in]

Type: ID2D1Effect*

The effect whose output is being rendered.

renderImageRectangle [in, optional]

Type: const D2D1_RECT_F*

This specified the rectangle in local space which will be rendered.

inputDescriptions [in, optional]

Type: const D2D1_EFFECT_INPUT_DESCRIPTION*

This parameter is completely optional. The rectangles in the structure are useful when the app is querying for information about an input which is not yet bound in the effect graph, but will be bound prior to rendering that effect graph.

requiredInputRects [out]

Type: D2D1_RECT_F *

The returned input rectangles.

inputCount

Type: UINT32

The number of required input rectangles.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid parameter was passed to the returning function.

 

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1DeviceContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.