diff options
author | jbauman <jbauman@chromium.org> | 2014-11-24 16:32:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-25 00:32:57 +0000 |
commit | e0d5719c440d632f2781e37915c70aba9ac2843b (patch) | |
tree | 2660f0f801af4e1effe96c757ad61a0ec25f28de /cc/surfaces/surface_aggregator.cc | |
parent | 65f5da46154417ca0dc13bc7e9ea382651a54636 (diff) | |
download | chromium_src-e0d5719c440d632f2781e37915c70aba9ac2843b.zip chromium_src-e0d5719c440d632f2781e37915c70aba9ac2843b.tar.gz chromium_src-e0d5719c440d632f2781e37915c70aba9ac2843b.tar.bz2 |
Remove size from Surfaces.
This isn't really useful anywhere, as what really matters is the output_rect of the root render pass of the delegated frame data that's given to the surface.
Review URL: https://codereview.chromium.org/750643005
Cr-Commit-Position: refs/heads/master@{#305534}
Diffstat (limited to 'cc/surfaces/surface_aggregator.cc')
-rw-r--r-- | cc/surfaces/surface_aggregator.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc index f5689c5b..35a1c1d 100644 --- a/cc/surfaces/surface_aggregator.cc +++ b/cc/surfaces/surface_aggregator.cc @@ -153,13 +153,14 @@ bool SurfaceAggregator::TakeResources(Surface* surface, } gfx::Rect SurfaceAggregator::DamageRectForSurface(const Surface* surface, - const RenderPass& source) { + const RenderPass& source, + const gfx::Rect& full_rect) { int previous_index = previous_contained_surfaces_[surface->surface_id()]; if (previous_index == surface->frame_index()) return gfx::Rect(); else if (previous_index == surface->frame_index() - 1) return source.damage_rect; - return gfx::Rect(surface->size()); + return full_rect; } void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, @@ -267,7 +268,8 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad, gfx::UnionRects(dest_pass->damage_rect, MathUtil::MapEnclosingClippedRect( surface_quad->quadTransform(), - DamageRectForSurface(surface, last_pass))); + DamageRectForSurface(surface, last_pass, + surface_quad->visible_rect))); referenced_surfaces_.erase(it); } @@ -364,9 +366,8 @@ void SurfaceAggregator::CopyPasses(const DelegatedFrameData* frame_data, RenderPassId remapped_pass_id = RemapPassId(source.id, surface->surface_id()); - copy_pass->SetAll(remapped_pass_id, - source.output_rect, - DamageRectForSurface(surface, source), + copy_pass->SetAll(remapped_pass_id, source.output_rect, + DamageRectForSurface(surface, source, source.output_rect), source.transform_to_root_target, source.has_transparent_background); |