D1111: Using Layer When Clip Is Sufficient
PERF - A layer is being used with a NULL opacity mask, 1.0 opacity, and an axis aligned rectangular geometric mask. The Push/Pop Clip API should achieve the same results with higher performance.
Placeholders
-
interface
-
The address of the interface.
Error Level | Information |
Examples
The following code uses the PushLayer and PopLayer when the layer contains only one primitive (a rectangle) and the fields of the D2D1_LAYER_PARAMETERS structure are set to defaults. For the default values of the D2D1_LAYER_PARAMETERS structure, see LayerParameter.
ID2D1Layer *m_pLayer;
hr = m_pRenderTarget->CreateLayer(D2D1::SizeF(100, 100), &m_pLayer);
m_pRenderTarget->PushLayer(D2D1::LayerParameters(), m_pLayer);
m_pRenderTarget->FillRectangle(D2D1::RectF(100, 50, 400, 160), m_pBlackBrush);
m_pRenderTarget->PopLayer();
This example produces the following debug message:
DEBUG INFO - PERF - A layer is being used with a NULL opacity mask, 1.0 opacity,
and an axis aligned rectangular geometric mask.
The Push/Pop Clip API should achieve the same results with higher performance.
Possible Causes
A layer was used when the PushAxisAlignedClip and PopAxisAlignedClip methods would have sufficed.