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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 referenced_surfaces_.erase(it); | 311 referenced_surfaces_.erase(it); |
312 } | 312 } |
313 | 313 |
314 SharedQuadState* SurfaceAggregator::CopySharedQuadState( | 314 SharedQuadState* SurfaceAggregator::CopySharedQuadState( |
315 const SharedQuadState* source_sqs, | 315 const SharedQuadState* source_sqs, |
316 const gfx::Transform& target_transform, | 316 const gfx::Transform& target_transform, |
317 const ClipData& clip_rect, | 317 const ClipData& clip_rect, |
318 RenderPass* dest_render_pass) { | 318 RenderPass* dest_render_pass) { |
319 SharedQuadState* copy_shared_quad_state = | 319 SharedQuadState* copy_shared_quad_state = |
320 dest_render_pass->CreateAndAppendSharedQuadState(); | 320 dest_render_pass->CreateAndAppendSharedQuadState(); |
321 copy_shared_quad_state->CopyFrom(source_sqs); | 321 *copy_shared_quad_state = *source_sqs; |
322 // target_transform contains any transformation that may exist | 322 // target_transform contains any transformation that may exist |
323 // between the context that these quads are being copied from (i.e. the | 323 // between the context that these quads are being copied from (i.e. the |
324 // surface's draw transform when aggregated from within a surface) to the | 324 // surface's draw transform when aggregated from within a surface) to the |
325 // target space of the pass. This will be identity except when copying the | 325 // target space of the pass. This will be identity except when copying the |
326 // root draw pass from a surface into a pass when the surface draw quad's | 326 // root draw pass from a surface into a pass when the surface draw quad's |
327 // transform is not identity. | 327 // transform is not identity. |
328 copy_shared_quad_state->quad_to_target_transform.ConcatTransform( | 328 copy_shared_quad_state->quad_to_target_transform.ConcatTransform( |
329 target_transform); | 329 target_transform); |
330 | 330 |
331 ClipData new_clip_rect = CalculateClipRect( | 331 ClipData new_clip_rect = CalculateClipRect( |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 | 839 |
840 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) { | 840 void SurfaceAggregator::SetFullDamageForSurface(SurfaceId surface_id) { |
841 auto it = previous_contained_surfaces_.find(surface_id); | 841 auto it = previous_contained_surfaces_.find(surface_id); |
842 if (it == previous_contained_surfaces_.end()) | 842 if (it == previous_contained_surfaces_.end()) |
843 return; | 843 return; |
844 // Set the last drawn index as 0 to ensure full damage next time it's drawn. | 844 // Set the last drawn index as 0 to ensure full damage next time it's drawn. |
845 it->second = 0; | 845 it->second = 0; |
846 } | 846 } |
847 | 847 |
848 } // namespace cc | 848 } // namespace cc |
OLD | NEW |