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 "base/values.h" | 7 #include "base/values.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/debug/traced_value.h" | 9 #include "cc/debug/traced_value.h" |
10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } else { | 105 } else { |
106 copy_pass->quad_list.push_back(source->quad_list[i]->Copy( | 106 copy_pass->quad_list.push_back(source->quad_list[i]->Copy( |
107 copy_pass->shared_quad_state_list[sqs_i])); | 107 copy_pass->shared_quad_state_list[sqs_i])); |
108 } | 108 } |
109 } | 109 } |
110 out->push_back(copy_pass.Pass()); | 110 out->push_back(copy_pass.Pass()); |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 void RenderPass::SetNew(Id id, | 114 void RenderPass::SetNew(Id id, |
115 gfx::Rect output_rect, | 115 const gfx::Rect& output_rect, |
116 gfx::RectF damage_rect, | 116 const gfx::RectF& damage_rect, |
117 const gfx::Transform& transform_to_root_target) { | 117 const gfx::Transform& transform_to_root_target) { |
118 DCHECK_GT(id.layer_id, 0); | 118 DCHECK_GT(id.layer_id, 0); |
119 DCHECK_GE(id.index, 0); | 119 DCHECK_GE(id.index, 0); |
120 | 120 |
121 this->id = id; | 121 this->id = id; |
122 this->output_rect = output_rect; | 122 this->output_rect = output_rect; |
123 this->damage_rect = damage_rect; | 123 this->damage_rect = damage_rect; |
124 this->transform_to_root_target = transform_to_root_target; | 124 this->transform_to_root_target = transform_to_root_target; |
125 | 125 |
126 DCHECK(quad_list.empty()); | 126 DCHECK(quad_list.empty()); |
127 DCHECK(shared_quad_state_list.empty()); | 127 DCHECK(shared_quad_state_list.empty()); |
128 } | 128 } |
129 | 129 |
130 void RenderPass::SetAll(Id id, | 130 void RenderPass::SetAll(Id id, |
131 gfx::Rect output_rect, | 131 const gfx::Rect& output_rect, |
132 gfx::RectF damage_rect, | 132 const gfx::RectF& damage_rect, |
133 const gfx::Transform& transform_to_root_target, | 133 const gfx::Transform& transform_to_root_target, |
134 bool has_transparent_background) { | 134 bool has_transparent_background) { |
135 DCHECK_GT(id.layer_id, 0); | 135 DCHECK_GT(id.layer_id, 0); |
136 DCHECK_GE(id.index, 0); | 136 DCHECK_GE(id.index, 0); |
137 | 137 |
138 this->id = id; | 138 this->id = id; |
139 this->output_rect = output_rect; | 139 this->output_rect = output_rect; |
140 this->damage_rect = damage_rect; | 140 this->damage_rect = damage_rect; |
141 this->transform_to_root_target = transform_to_root_target; | 141 this->transform_to_root_target = transform_to_root_target; |
142 this->has_transparent_background = has_transparent_background; | 142 this->has_transparent_background = has_transparent_background; |
(...skipping 19 matching lines...) Expand all Loading... |
162 } | 162 } |
163 value->Set("quad_list", quad_list_value.release()); | 163 value->Set("quad_list", quad_list_value.release()); |
164 | 164 |
165 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( | 165 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( |
166 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), | 166 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), |
167 value.get(), "cc::RenderPass", id.AsTracingId()); | 167 value.get(), "cc::RenderPass", id.AsTracingId()); |
168 return value.PassAs<base::Value>(); | 168 return value.PassAs<base::Value>(); |
169 } | 169 } |
170 | 170 |
171 } // namespace cc | 171 } // namespace cc |
OLD | NEW |