Chromium Code Reviews| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 shared_quad_state_list(sizeof(SharedQuadState), | 80 shared_quad_state_list(sizeof(SharedQuadState), |
| 81 shared_quad_state_list_size) { | 81 shared_quad_state_list_size) { |
| 82 } | 82 } |
| 83 | 83 |
| 84 RenderPass::~RenderPass() { | 84 RenderPass::~RenderPass() { |
| 85 TRACE_EVENT_OBJECT_DELETED_WITH_ID( | 85 TRACE_EVENT_OBJECT_DELETED_WITH_ID( |
| 86 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), | 86 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), |
| 87 "cc::RenderPass", id.AsTracingId()); | 87 "cc::RenderPass", id.AsTracingId()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 RenderPass& RenderPass::operator=(RenderPass&& other) { | |
|
danakj
2016/06/22 00:05:09
can you use =default?
Fady Samuel
2016/06/22 20:08:15
This change is unnecessary. Removed.
| |
| 91 id = other.id; | |
| 92 output_rect = other.output_rect; | |
| 93 damage_rect = other.damage_rect; | |
| 94 transform_to_root_target = other.transform_to_root_target; | |
| 95 has_transparent_background = other.has_transparent_background; | |
| 96 quad_list = std::move(other.quad_list); | |
| 97 copy_requests = std::move(other.copy_requests); | |
| 98 shared_quad_state_list = std::move(other.shared_quad_state_list); | |
| 99 return *this; | |
| 100 } | |
| 101 | |
| 90 std::unique_ptr<RenderPass> RenderPass::Copy(RenderPassId new_id) const { | 102 std::unique_ptr<RenderPass> RenderPass::Copy(RenderPassId new_id) const { |
| 91 std::unique_ptr<RenderPass> copy_pass( | 103 std::unique_ptr<RenderPass> copy_pass( |
| 92 Create(shared_quad_state_list.size(), quad_list.size())); | 104 Create(shared_quad_state_list.size(), quad_list.size())); |
| 93 copy_pass->SetAll(new_id, | 105 copy_pass->SetAll(new_id, |
| 94 output_rect, | 106 output_rect, |
| 95 damage_rect, | 107 damage_rect, |
| 96 transform_to_root_target, | 108 transform_to_root_target, |
| 97 has_transparent_background); | 109 has_transparent_background); |
| 98 return copy_pass; | 110 return copy_pass; |
| 99 } | 111 } |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 case DrawQuad::RENDER_PASS: | 270 case DrawQuad::RENDER_PASS: |
| 259 case DrawQuad::INVALID: | 271 case DrawQuad::INVALID: |
| 260 LOG(FATAL) << "Invalid DrawQuad material " << quad->material; | 272 LOG(FATAL) << "Invalid DrawQuad material " << quad->material; |
| 261 break; | 273 break; |
| 262 } | 274 } |
| 263 quad_list.back()->shared_quad_state = shared_quad_state; | 275 quad_list.back()->shared_quad_state = shared_quad_state; |
| 264 return quad_list.back(); | 276 return quad_list.back(); |
| 265 } | 277 } |
| 266 | 278 |
| 267 } // namespace cc | 279 } // namespace cc |
| OLD | NEW |