Lines Matching refs:layer
72 // for each layer in the layer_list:
73 // if the layer is actually a render_surface:
76 // add the layer's damage to the target surface.
81 // for each leftover layer:
82 // add the old layer/surface bounds to the target surface damage.
92 // layer is not changed, it does NOT mean that the layer can skip drawing.
94 // example, if a layer changed its opacity, then layers underneath must be
97 // - If a layer/surface property changed, the old bounds and new bounds may
100 // layer changed, its entire old bounds would always need to be redrawn,
101 // regardless of how much it overlaps with the layer's new bounds, which
105 // "change" in a layer/surface.
111 // 2. The map contains all the layer bounds that contributed to
113 // layer changes or does not exist anymore, those regions are then
182 LayerImpl* layer = layer_list[layer_index];
184 // We skip damage from the HUD layer because (a) the HUD layer damages the
185 // whole frame and (b) we don't want HUD layer damage to be shown by the
187 if (layer == layer->layer_tree_impl()->hud_layer())
191 layer, target_surface_layer_id))
192 ExtendDamageForRenderSurface(layer, &damage_rect);
194 ExtendDamageForLayer(layer, &damage_rect);
263 void DamageTracker::ExtendDamageForLayer(LayerImpl* layer,
265 // There are two ways that a layer can damage a region of the target surface:
267 // - the entire region of the layer itself damages the surface.
268 // - the old layer region also damages the surface, because this region
270 // - note that in many cases the old and new layer rects may overlap,
273 // 2. Repaint/update: If a region of the layer that was repainted/updated,
278 // This method is called when we want to consider how a layer contributes to
279 // its target RenderSurface, even if that layer owns the target RenderSurface
280 // itself. To consider how a layer's target surface contributes to the
284 RectMapData& data = RectDataForLayer(layer->id(), &layer_is_new);
288 layer->draw_transform(),
289 gfx::RectF(gfx::PointF(), layer->content_bounds()));
292 if (layer_is_new || layer->LayerPropertyChanged()) {
293 // If a layer is new or has changed, then its entire layer rect affects the
297 // The layer's old region is now exposed on the target surface, too.
300 } else if (!layer->update_rect().IsEmpty()) {
301 // If the layer properties haven't changed, then the the target surface is
302 // only affected by the layer's update area, which could be empty.
304 layer->LayerRectToContentRect(layer->update_rect());
306 MathUtil::MapClippedRect(layer->draw_transform(), update_content_rect);
312 LayerImpl* layer, gfx::RectF* target_damage_rect) {
328 RenderSurfaceImpl* render_surface = layer->render_surface();
331 RectMapData& data = RectDataForLayer(layer->id(), &surface_is_new);
360 if (layer->replica_layer()) {
370 if (layer->replica_layer() && layer->replica_layer()->mask_layer()) {
371 LayerImpl* replica_mask_layer = layer->replica_layer()->mask_layer();
392 // If the layer has a background filter, this may cause pixels in our surface
394 // layer. We expand the damage from this layer too, as we need to readback
397 // used for the blur in this layer this frame.
398 if (layer
401 layer->background_filters());