| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/quads/render_pass.h" | 5 #include "cc/quads/render_pass.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 std::unique_ptr<RenderPass> copy_pass(Create( | 105 std::unique_ptr<RenderPass> copy_pass(Create( |
| 106 source->shared_quad_state_list.size(), source->quad_list.size())); | 106 source->shared_quad_state_list.size(), source->quad_list.size())); |
| 107 copy_pass->SetAll(source->id, | 107 copy_pass->SetAll(source->id, |
| 108 source->output_rect, | 108 source->output_rect, |
| 109 source->damage_rect, | 109 source->damage_rect, |
| 110 source->transform_to_root_target, | 110 source->transform_to_root_target, |
| 111 source->has_transparent_background); | 111 source->has_transparent_background); |
| 112 for (const auto& shared_quad_state : source->shared_quad_state_list) { | 112 for (const auto& shared_quad_state : source->shared_quad_state_list) { |
| 113 SharedQuadState* copy_shared_quad_state = | 113 SharedQuadState* copy_shared_quad_state = |
| 114 copy_pass->CreateAndAppendSharedQuadState(); | 114 copy_pass->CreateAndAppendSharedQuadState(); |
| 115 copy_shared_quad_state->CopyFrom(shared_quad_state); | 115 *copy_shared_quad_state = *shared_quad_state; |
| 116 } | 116 } |
| 117 SharedQuadStateList::Iterator sqs_iter = | 117 SharedQuadStateList::Iterator sqs_iter = |
| 118 source->shared_quad_state_list.begin(); | 118 source->shared_quad_state_list.begin(); |
| 119 SharedQuadStateList::Iterator copy_sqs_iter = | 119 SharedQuadStateList::Iterator copy_sqs_iter = |
| 120 copy_pass->shared_quad_state_list.begin(); | 120 copy_pass->shared_quad_state_list.begin(); |
| 121 for (const auto& quad : source->quad_list) { | 121 for (const auto& quad : source->quad_list) { |
| 122 while (quad->shared_quad_state != *sqs_iter) { | 122 while (quad->shared_quad_state != *sqs_iter) { |
| 123 ++sqs_iter; | 123 ++sqs_iter; |
| 124 ++copy_sqs_iter; | 124 ++copy_sqs_iter; |
| 125 DCHECK(sqs_iter != source->shared_quad_state_list.end()); | 125 DCHECK(sqs_iter != source->shared_quad_state_list.end()); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 case DrawQuad::RENDER_PASS: | 254 case DrawQuad::RENDER_PASS: |
| 255 case DrawQuad::INVALID: | 255 case DrawQuad::INVALID: |
| 256 LOG(FATAL) << "Invalid DrawQuad material " << quad->material; | 256 LOG(FATAL) << "Invalid DrawQuad material " << quad->material; |
| 257 break; | 257 break; |
| 258 } | 258 } |
| 259 quad_list.back()->shared_quad_state = shared_quad_state; | 259 quad_list.back()->shared_quad_state = shared_quad_state; |
| 260 return quad_list.back(); | 260 return quad_list.back(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace cc | 263 } // namespace cc |
| OLD | NEW |