| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 | 383 |
| 384 void DelegatedRendererLayerImpl::AppendRenderPassQuads( | 384 void DelegatedRendererLayerImpl::AppendRenderPassQuads( |
| 385 RenderPass* render_pass, | 385 RenderPass* render_pass, |
| 386 const Occlusion& occlusion_in_content_space, | 386 const Occlusion& occlusion_in_content_space, |
| 387 AppendQuadsData* append_quads_data, | 387 AppendQuadsData* append_quads_data, |
| 388 const RenderPass* delegated_render_pass, | 388 const RenderPass* delegated_render_pass, |
| 389 const gfx::Size& frame_size) const { | 389 const gfx::Size& frame_size) const { |
| 390 const SharedQuadState* delegated_shared_quad_state = NULL; | 390 const SharedQuadState* delegated_shared_quad_state = nullptr; |
| 391 SharedQuadState* output_shared_quad_state = NULL; | 391 SharedQuadState* output_shared_quad_state = nullptr; |
| 392 | 392 |
| 393 for (const auto& delegated_quad : delegated_render_pass->quad_list) { | 393 for (const auto& delegated_quad : delegated_render_pass->quad_list) { |
| 394 bool is_root_delegated_render_pass = | 394 bool is_root_delegated_render_pass = |
| 395 delegated_render_pass == render_passes_in_draw_order_.back(); | 395 delegated_render_pass == render_passes_in_draw_order_.back(); |
| 396 | 396 |
| 397 if (delegated_quad.shared_quad_state != delegated_shared_quad_state) { | 397 if (delegated_quad.shared_quad_state != delegated_shared_quad_state) { |
| 398 delegated_shared_quad_state = delegated_quad.shared_quad_state; | 398 delegated_shared_quad_state = delegated_quad.shared_quad_state; |
| 399 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); | 399 output_shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); |
| 400 output_shared_quad_state->CopyFrom(delegated_shared_quad_state); | 400 output_shared_quad_state->CopyFrom(delegated_shared_quad_state); |
| 401 | 401 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 if (own_child_id_) { | 491 if (own_child_id_) { |
| 492 ResourceProvider* provider = layer_tree_impl()->resource_provider(); | 492 ResourceProvider* provider = layer_tree_impl()->resource_provider(); |
| 493 provider->DestroyChild(child_id_); | 493 provider->DestroyChild(child_id_); |
| 494 } | 494 } |
| 495 | 495 |
| 496 resources_.clear(); | 496 resources_.clear(); |
| 497 child_id_ = 0; | 497 child_id_ = 0; |
| 498 } | 498 } |
| 499 | 499 |
| 500 } // namespace cc | 500 } // namespace cc |
| OLD | NEW |