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

Side by Side Diff: cc/output/filter_operation.cc

Issue 2155893002: cc: Fix filter operation LinearIntValueBetween parameter order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 to_op.drop_shadow_offset().x()), 240 to_op.drop_shadow_offset().x()),
241 gfx::Tween::LinearIntValueBetween(progress, 241 gfx::Tween::LinearIntValueBetween(progress,
242 from_op.drop_shadow_offset().y(), 242 from_op.drop_shadow_offset().y(),
243 to_op.drop_shadow_offset().y())); 243 to_op.drop_shadow_offset().y()));
244 blended_filter.set_drop_shadow_offset(blended_offset); 244 blended_filter.set_drop_shadow_offset(blended_offset);
245 blended_filter.set_drop_shadow_color(gfx::Tween::ColorValueBetween( 245 blended_filter.set_drop_shadow_color(gfx::Tween::ColorValueBetween(
246 progress, from_op.drop_shadow_color(), to_op.drop_shadow_color())); 246 progress, from_op.drop_shadow_color(), to_op.drop_shadow_color()));
247 } else if (to_op.type() == FilterOperation::ZOOM) { 247 } else if (to_op.type() == FilterOperation::ZOOM) {
248 blended_filter.set_zoom_inset( 248 blended_filter.set_zoom_inset(
249 std::max(gfx::Tween::LinearIntValueBetween( 249 std::max(gfx::Tween::LinearIntValueBetween(
250 from_op.zoom_inset(), to_op.zoom_inset(), progress), 250 progress, from_op.zoom_inset(), to_op.zoom_inset()),
251 0)); 251 0));
252 } else if (to_op.type() == FilterOperation::ALPHA_THRESHOLD) { 252 } else if (to_op.type() == FilterOperation::ALPHA_THRESHOLD) {
253 blended_filter.set_outer_threshold(ClampAmountForFilterType( 253 blended_filter.set_outer_threshold(ClampAmountForFilterType(
254 gfx::Tween::FloatValueBetween(progress, 254 gfx::Tween::FloatValueBetween(progress,
255 from_op.outer_threshold(), 255 from_op.outer_threshold(),
256 to_op.outer_threshold()), 256 to_op.outer_threshold()),
257 to_op.type())); 257 to_op.type()));
258 blended_filter.set_region(to_op.region()); 258 blended_filter.set_region(to_op.region());
259 } 259 }
260 260
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 SkImageFilter::kForward_MapDirection); 376 SkImageFilter::kForward_MapDirection);
377 } 377 }
378 378
379 gfx::Rect FilterOperation::MapRectReverse(const gfx::Rect& rect, 379 gfx::Rect FilterOperation::MapRectReverse(const gfx::Rect& rect,
380 const SkMatrix& matrix) const { 380 const SkMatrix& matrix) const {
381 return MapRectInternal(*this, rect, matrix, 381 return MapRectInternal(*this, rect, matrix,
382 SkImageFilter::kReverse_MapDirection); 382 SkImageFilter::kReverse_MapDirection);
383 } 383 }
384 384
385 } // namespace cc 385 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698