| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 output_shared_quad_state->clip_rect = clip_rect; | 440 output_shared_quad_state->clip_rect = clip_rect; |
| 441 output_shared_quad_state->is_clipped = true; | 441 output_shared_quad_state->is_clipped = true; |
| 442 } | 442 } |
| 443 | 443 |
| 444 output_shared_quad_state->opacity *= draw_opacity(); | 444 output_shared_quad_state->opacity *= draw_opacity(); |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 DCHECK(output_shared_quad_state); | 447 DCHECK(output_shared_quad_state); |
| 448 | 448 |
| 449 gfx::Rect quad_visible_rect = quad_sink->UnoccludedContentRect( | 449 gfx::Rect quad_visible_rect = quad_sink->UnoccludedContentRect( |
| 450 this, |
| 450 delegated_quad->visible_rect, | 451 delegated_quad->visible_rect, |
| 451 output_shared_quad_state->content_to_target_transform); | 452 output_shared_quad_state->content_to_target_transform); |
| 452 if (quad_visible_rect.IsEmpty()) | 453 if (quad_visible_rect.IsEmpty()) |
| 453 continue; | 454 continue; |
| 454 | 455 |
| 455 scoped_ptr<DrawQuad> output_quad; | 456 scoped_ptr<DrawQuad> output_quad; |
| 456 if (delegated_quad->material != DrawQuad::RENDER_PASS) { | 457 if (delegated_quad->material != DrawQuad::RENDER_PASS) { |
| 457 output_quad = delegated_quad->Copy(output_shared_quad_state); | 458 output_quad = delegated_quad->Copy(output_shared_quad_state); |
| 458 output_quad->visible_rect = quad_visible_rect; | 459 output_quad->visible_rect = quad_visible_rect; |
| 459 } else { | 460 } else { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 if (own_child_id_) { | 495 if (own_child_id_) { |
| 495 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 496 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
| 496 provider->DestroyChild(child_id_); | 497 provider->DestroyChild(child_id_); |
| 497 } | 498 } |
| 498 | 499 |
| 499 resources_.clear(); | 500 resources_.clear(); |
| 500 child_id_ = 0; | 501 child_id_ = 0; |
| 501 } | 502 } |
| 502 | 503 |
| 503 } // namespace cc | 504 } // namespace cc |
| OLD | NEW |