| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 output_shared_quad_state->opacity *= draw_opacity(); | 434 output_shared_quad_state->opacity *= draw_opacity(); |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 DCHECK(output_shared_quad_state); | 437 DCHECK(output_shared_quad_state); |
| 438 | 438 |
| 439 gfx::Transform quad_content_to_delegated_target_space = | 439 gfx::Transform quad_content_to_delegated_target_space = |
| 440 output_shared_quad_state->content_to_target_transform; | 440 output_shared_quad_state->content_to_target_transform; |
| 441 if (!is_root_delegated_render_pass) { | 441 if (!is_root_delegated_render_pass) { |
| 442 quad_content_to_delegated_target_space.ConcatTransform( | 442 quad_content_to_delegated_target_space.ConcatTransform( |
| 443 render_pass->transform_to_root_target); | 443 delegated_render_pass->transform_to_root_target); |
| 444 quad_content_to_delegated_target_space.ConcatTransform(draw_transform()); | 444 quad_content_to_delegated_target_space.ConcatTransform(draw_transform()); |
| 445 } | 445 } |
| 446 | 446 |
| 447 gfx::Rect quad_visible_rect = | 447 gfx::Rect quad_visible_rect = |
| 448 occlusion_tracker.GetCurrentOcclusionForLayer( | 448 occlusion_tracker.GetCurrentOcclusionForLayer( |
| 449 quad_content_to_delegated_target_space) | 449 quad_content_to_delegated_target_space) |
| 450 .GetUnoccludedContentRect(delegated_quad->visible_rect); | 450 .GetUnoccludedContentRect(delegated_quad->visible_rect); |
| 451 | 451 |
| 452 if (quad_visible_rect.IsEmpty()) | 452 if (quad_visible_rect.IsEmpty()) |
| 453 continue; | 453 continue; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 if (own_child_id_) { | 493 if (own_child_id_) { |
| 494 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 494 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
| 495 provider->DestroyChild(child_id_); | 495 provider->DestroyChild(child_id_); |
| 496 } | 496 } |
| 497 | 497 |
| 498 resources_.clear(); | 498 resources_.clear(); |
| 499 child_id_ = 0; | 499 child_id_ = 0; |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace cc | 502 } // namespace cc |
| OLD | NEW |