OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/delegated_renderer_layer_impl.h" | 5 #include "cc/layers/delegated_renderer_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 if (delegated_quad->shared_quad_state != delegated_shared_quad_state) { | 426 if (delegated_quad->shared_quad_state != delegated_shared_quad_state) { |
427 delegated_shared_quad_state = delegated_quad->shared_quad_state; | 427 delegated_shared_quad_state = delegated_quad->shared_quad_state; |
428 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); | 428 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); |
429 output_shared_quad_state->CopyFrom(delegated_shared_quad_state); | 429 output_shared_quad_state->CopyFrom(delegated_shared_quad_state); |
430 | 430 |
431 if (is_root_delegated_render_pass) { | 431 if (is_root_delegated_render_pass) { |
432 output_shared_quad_state->quad_to_target_transform.ConcatTransform( | 432 output_shared_quad_state->quad_to_target_transform.ConcatTransform( |
433 delegated_frame_to_target_transform); | 433 delegated_frame_to_target_transform); |
434 | 434 |
435 if (render_target() == this) { | 435 if (render_target() == this) { |
436 DCHECK(!is_clipped()); | 436 DCHECK(!is_clipped_from_property_tree()); |
437 DCHECK(render_surface()); | 437 DCHECK(render_surface()); |
438 DCHECK_EQ(0u, num_unclipped_descendants()); | 438 DCHECK_EQ(0u, num_unclipped_descendants()); |
439 output_shared_quad_state->clip_rect = | 439 output_shared_quad_state->clip_rect = |
440 MathUtil::MapEnclosingClippedRect( | 440 MathUtil::MapEnclosingClippedRect( |
441 delegated_frame_to_target_transform, | 441 delegated_frame_to_target_transform, |
442 output_shared_quad_state->clip_rect); | 442 output_shared_quad_state->clip_rect); |
443 } else { | 443 } else { |
444 gfx::Rect clip_rect = drawable_content_rect(); | 444 gfx::Rect clip_rect = drawable_content_rect(); |
445 if (output_shared_quad_state->is_clipped) { | 445 if (output_shared_quad_state->is_clipped) { |
446 clip_rect.Intersect(MathUtil::MapEnclosingClippedRect( | 446 clip_rect.Intersect(MathUtil::MapEnclosingClippedRect( |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 if (own_child_id_) { | 515 if (own_child_id_) { |
516 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 516 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
517 provider->DestroyChild(child_id_); | 517 provider->DestroyChild(child_id_); |
518 } | 518 } |
519 | 519 |
520 resources_.clear(); | 520 resources_.clear(); |
521 child_id_ = 0; | 521 child_id_ = 0; |
522 } | 522 } |
523 | 523 |
524 } // namespace cc | 524 } // namespace cc |
OLD | NEW |