Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: cc/trees/damage_tracker.cc

Issue 2483033002: Revert of cc: Remove more references to owning_layer_ from RenderSurfaceImpl (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/damage_tracker.h" 5 #include "cc/trees/damage_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // changes to their entire subtree. 356 // changes to their entire subtree.
357 // - just like layers, both the old surface rect and new surface rect 357 // - just like layers, both the old surface rect and new surface rect
358 // will damage the target surface in this case. 358 // will damage the target surface in this case.
359 // 359 //
360 // 2. Damage rect: This surface may have been damaged by its own layer_list 360 // 2. Damage rect: This surface may have been damaged by its own layer_list
361 // as well, and that damage should propagate to the target surface. 361 // as well, and that damage should propagate to the target surface.
362 // 362 //
363 363
364 bool surface_is_new = false; 364 bool surface_is_new = false;
365 SurfaceRectMapData& data = 365 SurfaceRectMapData& data =
366 RectDataForSurface(render_surface->id(), &surface_is_new); 366 RectDataForSurface(render_surface->OwningLayerId(), &surface_is_new);
367 gfx::Rect old_surface_rect = data.rect_; 367 gfx::Rect old_surface_rect = data.rect_;
368 368
369 gfx::Rect surface_rect_in_target_space = 369 gfx::Rect surface_rect_in_target_space =
370 gfx::ToEnclosingRect(render_surface->DrawableContentRect()); 370 gfx::ToEnclosingRect(render_surface->DrawableContentRect());
371 data.Update(surface_rect_in_target_space, mailboxId_); 371 data.Update(surface_rect_in_target_space, mailboxId_);
372 372
373 if (surface_is_new || render_surface->SurfacePropertyChanged()) { 373 if (surface_is_new || render_surface->SurfacePropertyChanged()) {
374 // The entire surface contributes damage. 374 // The entire surface contributes damage.
375 target_damage_rect->Union(surface_rect_in_target_space); 375 target_damage_rect->Union(surface_rect_in_target_space);
376 376
(...skipping 22 matching lines...) Expand all
399 // used for the blur in this layer this frame. 399 // used for the blur in this layer this frame.
400 const FilterOperations& background_filters = 400 const FilterOperations& background_filters =
401 render_surface->BackgroundFilters(); 401 render_surface->BackgroundFilters();
402 if (background_filters.HasFilterThatMovesPixels()) { 402 if (background_filters.HasFilterThatMovesPixels()) {
403 ExpandDamageRectInsideRectWithFilters( 403 ExpandDamageRectInsideRectWithFilters(
404 target_damage_rect, surface_rect_in_target_space, background_filters); 404 target_damage_rect, surface_rect_in_target_space, background_filters);
405 } 405 }
406 } 406 }
407 407
408 } // namespace cc 408 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/draw_property_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698