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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 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 = occlusion_tracker.UnoccludedContentRect( | 447 gfx::Rect quad_visible_rect = |
448 delegated_quad->visible_rect, quad_content_to_delegated_target_space); | 448 occlusion_tracker.GetCurrentOcclusionForLayer( |
danakj
2014/09/18 01:48:45
Are you going to pass the Occlusion instead of the
vmpstr
2014/09/18 21:45:19
Yeah, I wanna do it separately so if the world exp
| |
449 quad_content_to_delegated_target_space) | |
450 .GetUnoccludedContentRect(delegated_quad->visible_rect); | |
449 | 451 |
450 if (quad_visible_rect.IsEmpty()) | 452 if (quad_visible_rect.IsEmpty()) |
451 continue; | 453 continue; |
452 | 454 |
453 if (delegated_quad->material != DrawQuad::RENDER_PASS) { | 455 if (delegated_quad->material != DrawQuad::RENDER_PASS) { |
454 DrawQuad* output_quad = render_pass->CopyFromAndAppendDrawQuad( | 456 DrawQuad* output_quad = render_pass->CopyFromAndAppendDrawQuad( |
455 delegated_quad, output_shared_quad_state); | 457 delegated_quad, output_shared_quad_state); |
456 output_quad->visible_rect = quad_visible_rect; | 458 output_quad->visible_rect = quad_visible_rect; |
457 } else { | 459 } else { |
458 RenderPassId delegated_contributing_render_pass_id = | 460 RenderPassId delegated_contributing_render_pass_id = |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 if (own_child_id_) { | 493 if (own_child_id_) { |
492 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 494 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
493 provider->DestroyChild(child_id_); | 495 provider->DestroyChild(child_id_); |
494 } | 496 } |
495 | 497 |
496 resources_.clear(); | 498 resources_.clear(); |
497 child_id_ = 0; | 499 child_id_ = 0; |
498 } | 500 } |
499 | 501 |
500 } // namespace cc | 502 } // namespace cc |
OLD | NEW |