OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces/surface_aggregator.h" | 5 #include "cc/surfaces/surface_aggregator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 dest_pass, surface_id); | 287 dest_pass, surface_id); |
288 } else { | 288 } else { |
289 RenderPassId remapped_pass_id = RemapPassId(last_pass.id, surface_id); | 289 RenderPassId remapped_pass_id = RemapPassId(last_pass.id, surface_id); |
290 | 290 |
291 SharedQuadState* shared_quad_state = | 291 SharedQuadState* shared_quad_state = |
292 CopySharedQuadState(surface_quad->shared_quad_state, target_transform, | 292 CopySharedQuadState(surface_quad->shared_quad_state, target_transform, |
293 clip_rect, dest_pass); | 293 clip_rect, dest_pass); |
294 | 294 |
295 RenderPassDrawQuad* quad = | 295 RenderPassDrawQuad* quad = |
296 dest_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 296 dest_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
297 quad->SetNew(shared_quad_state, | 297 quad->SetNew(shared_quad_state, surface_quad->rect, |
298 surface_quad->rect, | 298 surface_quad->visible_rect, remapped_pass_id, 0, |
299 surface_quad->visible_rect, | 299 gfx::Vector2dF(), gfx::Size(), FilterOperations(), |
300 remapped_pass_id, | 300 gfx::Vector2dF(), gfx::PointF(), FilterOperations()); |
301 0, | |
302 gfx::Vector2dF(), | |
303 gfx::Size(), | |
304 FilterOperations(), | |
305 gfx::Vector2dF(), | |
306 FilterOperations()); | |
307 } | 301 } |
308 | 302 |
309 referenced_surfaces_.erase(it); | 303 referenced_surfaces_.erase(it); |
310 } | 304 } |
311 | 305 |
312 SharedQuadState* SurfaceAggregator::CopySharedQuadState( | 306 SharedQuadState* SurfaceAggregator::CopySharedQuadState( |
313 const SharedQuadState* source_sqs, | 307 const SharedQuadState* source_sqs, |
314 const gfx::Transform& target_transform, | 308 const gfx::Transform& target_transform, |
315 const ClipData& clip_rect, | 309 const ClipData& clip_rect, |
316 RenderPass* dest_render_pass) { | 310 RenderPass* dest_render_pass) { |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 | 829 |
836 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { | 830 void SurfaceAggregator::SetFullDamageForSurface(const SurfaceId& surface_id) { |
837 auto it = previous_contained_surfaces_.find(surface_id); | 831 auto it = previous_contained_surfaces_.find(surface_id); |
838 if (it == previous_contained_surfaces_.end()) | 832 if (it == previous_contained_surfaces_.end()) |
839 return; | 833 return; |
840 // Set the last drawn index as 0 to ensure full damage next time it's drawn. | 834 // Set the last drawn index as 0 to ensure full damage next time it's drawn. |
841 it->second = 0; | 835 it->second = 0; |
842 } | 836 } |
843 | 837 |
844 } // namespace cc | 838 } // namespace cc |
OLD | NEW |