Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ac3f66e

Browse files
committed
update GetCacheableChild docs with review suggestion
1 parent 08b7e7d commit ac3f66e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

flow/layers/opacity_layer.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ class OpacityLayer : public ContainerLayer {
7676
* and this method will return that single child if possible to improve
7777
* the performance of caching the children.
7878
*
79+
* Note that if GetCacheableChild() does not find a single stable child of
80+
* the child container it will return the child container as a fallback.
81+
* Even though that child is new in each frame of an animation and thus we
82+
* cannot reuse the cached layer raster between animation frames, the single
83+
* container child will allow us to paint the child onto an offscreen buffer
84+
* during Preroll() which reduces one render target switch compared to
85+
* painting the child on the fly via an AutoSaveLayer in Paint() and thus
86+
* still improves our performance.
87+
*
7988
* @see GetChildContainer()
8089
* @return the best candidate Layer for caching the children
8190
*/

0 commit comments

Comments
 (0)