Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: cc/quads/render_pass.cc

Issue 853393002: cc: refactor of MathUtil::AddToTracedValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/quads/picture_draw_quad.cc ('k') | cc/quads/render_pass_draw_quad.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event_argument.h" 9 #include "base/debug/trace_event_argument.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 this->output_rect = output_rect; 174 this->output_rect = output_rect;
175 this->damage_rect = damage_rect; 175 this->damage_rect = damage_rect;
176 this->transform_to_root_target = transform_to_root_target; 176 this->transform_to_root_target = transform_to_root_target;
177 this->has_transparent_background = has_transparent_background; 177 this->has_transparent_background = has_transparent_background;
178 178
179 DCHECK(quad_list.empty()); 179 DCHECK(quad_list.empty());
180 DCHECK(shared_quad_state_list.empty()); 180 DCHECK(shared_quad_state_list.empty());
181 } 181 }
182 182
183 void RenderPass::AsValueInto(base::debug::TracedValue* value) const { 183 void RenderPass::AsValueInto(base::debug::TracedValue* value) const {
184 value->BeginArray("output_rect"); 184 MathUtil::AddToTracedValue("output_rect", output_rect, value);
185 MathUtil::AddToTracedValue(output_rect, value); 185 MathUtil::AddToTracedValue("damage_rect", damage_rect, value);
186 value->EndArray();
187
188 value->BeginArray("damage_rect");
189 MathUtil::AddToTracedValue(damage_rect, value);
190 value->EndArray();
191 186
192 value->SetBoolean("has_transparent_background", has_transparent_background); 187 value->SetBoolean("has_transparent_background", has_transparent_background);
193 value->SetInteger("copy_requests", copy_requests.size()); 188 value->SetInteger("copy_requests", copy_requests.size());
194 189
195 value->BeginArray("shared_quad_state_list"); 190 value->BeginArray("shared_quad_state_list");
196 for (const auto& shared_quad_state : shared_quad_state_list) { 191 for (const auto& shared_quad_state : shared_quad_state_list) {
197 value->BeginDictionary(); 192 value->BeginDictionary();
198 shared_quad_state->AsValueInto(value); 193 shared_quad_state->AsValueInto(value);
199 value->EndDictionary(); 194 value->EndDictionary();
200 } 195 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 case DrawQuad::RENDER_PASS: 263 case DrawQuad::RENDER_PASS:
269 case DrawQuad::INVALID: 264 case DrawQuad::INVALID:
270 LOG(FATAL) << "Invalid DrawQuad material " << quad->material; 265 LOG(FATAL) << "Invalid DrawQuad material " << quad->material;
271 break; 266 break;
272 } 267 }
273 quad_list.back()->shared_quad_state = shared_quad_state; 268 quad_list.back()->shared_quad_state = shared_quad_state;
274 return quad_list.back(); 269 return quad_list.back();
275 } 270 }
276 271
277 } // namespace cc 272 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/picture_draw_quad.cc ('k') | cc/quads/render_pass_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698