Applications that use the HW/LW Mixing feature should validate their component hierarchies (see 6868255 for details).
Every operation changing layout-related information (e.g. setBounds(), setVisible(), setFont(), etc.) invalidates the component hierarchy. However, the current implemetnation of the hw/lw mixing also triggers the mixing code when such operations occur.
If invalidation of the hierarchy happens before calling the mixing code, then the mixing code will immediately return, spending, however, some time figuring out if the mixing is really needed to be performed or not.
If invalidation happens after calling the mixing code, then the shapes of components will be anyway recalculated again when validation of the hierarchy happens. If they appear to be equal to what's been calculated when, say, the setBounds() method was invoked, nothing will happen. Otherwise, the updated shape will be re-installed to the component.
One may notice that in both cases there's code that gets executed but either results in almost no-op, or recalculates the shapes once more time anyway.
Thus, eliminating the unnecessary code we can improve the performance of GUI applications.