Share via


Sharing DirectDrawClipper Objects

Send Feedback

DirectDrawClipper objects can be shared between multiple surfaces.

For example, the same DirectDrawClipper object can be set on both the front buffer and the back buffer of a flipping chain. When an application attaches a DirectDrawClipper object to a surface by using the IDirectDrawSurface::SetClipper method, the surface increments the reference count of that object.

When the reference count of the surface reaches 0, the surface will decrement the reference count of the attached DirectDrawClipper object.

In addition, if a DirectDrawClipper object is detached from a surface by calling IDirectDrawSurface::SetClipper with a NULL clipper interface pointer, the reference count of the surface's DirectDrawClipper object will be decremented.

Note If IDirectDrawSurface::SetClipper is called several times consecutively on the same surface for the same DirectDrawClipper object, the reference count for the object is incremented only once. Subsequent calls do not affect the object's reference count.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.