/**
* By default, children are clipped to their bounds before drawing. This
* allows view groups to override this behavior for animations, etc.
*
* @param clipChildren true to clip children to their bounds,
* false otherwise
* @attr ref android.R.styleable#ViewGroup_clipChildren
*/publicvoidsetClipChildren(booleanclipChildren){booleanpreviousValue=(mGroupFlags&FLAG_CLIP_CHILDREN)==FLAG_CLIP_CHILDREN;if(clipChildren!=previousValue){setBooleanFlag(FLAG_CLIP_CHILDREN,clipChildren);for(inti=0;i<mChildrenCount;++i){Viewchild=getChildAt(i);if(child.mRenderNode!=null){child.mRenderNode.setClipToBounds(clipChildren);}}invalidate(true);}}
/**
* RenderNode holding View properties, potentially holding a DisplayList of View content.
* <p>
* When non-null and valid, this is expected to contain an up-to-date copy
* of the View content. Its DisplayList content is cleared on temporary detach and reset on
* cleanup.
*/@UnsupportedAppUsagefinalRenderNodemRenderNode;
/**
* Set whether the Render node should clip itself to its bounds. This defaults to true,
* and is useful to the renderer in enable quick-rejection of chunks of the tree as well as
* better partial invalidation support.
*
* @param clipToBounds true if the display list should clip to its bounds, false otherwise.
* @return True if the value changed, false if the new value was the same as the previous value.
*/publicbooleansetClipToBounds(booleanclipToBounds){returnnSetClipToBounds(mNativeRenderNode,clipToBounds);}