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 "cc/quads/draw_quad.h" | 7 #include "cc/quads/draw_quad.h" |
8 #include "cc/quads/shared_quad_state.h" | 8 #include "cc/quads/shared_quad_state.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 scoped_ptr<RenderPass> RenderPass::Create() { | 12 scoped_ptr<RenderPass> RenderPass::Create() { |
13 return make_scoped_ptr(new RenderPass); | 13 return make_scoped_ptr(new RenderPass); |
14 } | 14 } |
15 | 15 |
16 RenderPass::RenderPass() | 16 RenderPass::RenderPass() |
17 : id(Id(-1, -1)), | 17 : id(Id(-1, -1)), |
18 has_transparent_background(true), | 18 has_transparent_background(true), |
19 has_occlusion_from_outside_target_surface(false) { | 19 has_occlusion_from_outside_target_surface(false) {} |
20 } | |
21 | 20 |
22 RenderPass::~RenderPass() { | 21 RenderPass::~RenderPass() {} |
23 } | |
24 | 22 |
25 scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const { | 23 scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const { |
26 DCHECK(new_id != id); | 24 DCHECK(new_id != id); |
27 | 25 |
28 scoped_ptr<RenderPass> copy_pass(Create()); | 26 scoped_ptr<RenderPass> copy_pass(Create()); |
29 copy_pass->SetAll(new_id, | 27 copy_pass->SetAll(new_id, |
30 output_rect, | 28 output_rect, |
31 damage_rect, | 29 damage_rect, |
32 transform_to_root_target, | 30 transform_to_root_target, |
33 has_transparent_background, | 31 has_transparent_background, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 this->transform_to_root_target = transform_to_root_target; | 64 this->transform_to_root_target = transform_to_root_target; |
67 this->has_transparent_background = has_transparent_background; | 65 this->has_transparent_background = has_transparent_background; |
68 this->has_occlusion_from_outside_target_surface = | 66 this->has_occlusion_from_outside_target_surface = |
69 has_occlusion_from_outside_target_surface; | 67 has_occlusion_from_outside_target_surface; |
70 | 68 |
71 DCHECK(quad_list.empty()); | 69 DCHECK(quad_list.empty()); |
72 DCHECK(shared_quad_state_list.empty()); | 70 DCHECK(shared_quad_state_list.empty()); |
73 } | 71 } |
74 | 72 |
75 } // namespace cc | 73 } // namespace cc |
OLD | NEW |