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

Side by Side Diff: cc/output/filter_operation.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/layers/tiled_layer_impl.cc ('k') | cc/quads/content_draw_quad_base.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/debug/trace_event_argument.h" 7 #include "base/debug/trace_event_argument.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/output/filter_operation.h" 10 #include "cc/output/filter_operation.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 case FilterOperation::INVERT: 265 case FilterOperation::INVERT:
266 case FilterOperation::BRIGHTNESS: 266 case FilterOperation::BRIGHTNESS:
267 case FilterOperation::CONTRAST: 267 case FilterOperation::CONTRAST:
268 case FilterOperation::OPACITY: 268 case FilterOperation::OPACITY:
269 case FilterOperation::BLUR: 269 case FilterOperation::BLUR:
270 case FilterOperation::SATURATING_BRIGHTNESS: 270 case FilterOperation::SATURATING_BRIGHTNESS:
271 value->SetDouble("amount", amount_); 271 value->SetDouble("amount", amount_);
272 break; 272 break;
273 case FilterOperation::DROP_SHADOW: 273 case FilterOperation::DROP_SHADOW:
274 value->SetDouble("std_deviation", amount_); 274 value->SetDouble("std_deviation", amount_);
275 value->BeginArray("offset"); 275 MathUtil::AddToTracedValue("offset", drop_shadow_offset_, value);
276 MathUtil::AddToTracedValue(drop_shadow_offset_, value);
277 value->EndArray();
278 value->SetInteger("color", drop_shadow_color_); 276 value->SetInteger("color", drop_shadow_color_);
279 break; 277 break;
280 case FilterOperation::COLOR_MATRIX: { 278 case FilterOperation::COLOR_MATRIX: {
281 value->BeginArray("matrix"); 279 value->BeginArray("matrix");
282 for (size_t i = 0; i < arraysize(matrix_); ++i) 280 for (size_t i = 0; i < arraysize(matrix_); ++i)
283 value->AppendDouble(matrix_[i]); 281 value->AppendDouble(matrix_[i]);
284 value->EndArray(); 282 value->EndArray();
285 break; 283 break;
286 } 284 }
287 case FilterOperation::ZOOM: 285 case FilterOperation::ZOOM:
(...skipping 23 matching lines...) Expand all
311 value->AppendInteger(it.rect().width()); 309 value->AppendInteger(it.rect().width());
312 value->AppendInteger(it.rect().height()); 310 value->AppendInteger(it.rect().height());
313 } 311 }
314 value->EndArray(); 312 value->EndArray();
315 } 313 }
316 break; 314 break;
317 } 315 }
318 } 316 }
319 317
320 } // namespace cc 318 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_impl.cc ('k') | cc/quads/content_draw_quad_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698