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

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

Issue 397393002: Use separate-sigma version of SkDropShadowImageFilter::Create (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/output/render_surface_filters.h" 5 #include "cc/output/render_surface_filters.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "cc/output/filter_operation.h" 10 #include "cc/output/filter_operation.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 break; 202 break;
203 case FilterOperation::BLUR: 203 case FilterOperation::BLUR:
204 image_filter = skia::AdoptRef(SkBlurImageFilter::Create( 204 image_filter = skia::AdoptRef(SkBlurImageFilter::Create(
205 op.amount(), op.amount(), image_filter.get())); 205 op.amount(), op.amount(), image_filter.get()));
206 break; 206 break;
207 case FilterOperation::DROP_SHADOW: 207 case FilterOperation::DROP_SHADOW:
208 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create( 208 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create(
209 SkIntToScalar(op.drop_shadow_offset().x()), 209 SkIntToScalar(op.drop_shadow_offset().x()),
210 SkIntToScalar(op.drop_shadow_offset().y()), 210 SkIntToScalar(op.drop_shadow_offset().y()),
211 SkIntToScalar(op.amount()), 211 SkIntToScalar(op.amount()),
212 SkIntToScalar(op.amount()),
212 op.drop_shadow_color(), 213 op.drop_shadow_color(),
213 image_filter.get())); 214 image_filter.get()));
214 break; 215 break;
215 case FilterOperation::COLOR_MATRIX: 216 case FilterOperation::COLOR_MATRIX:
216 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter); 217 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter);
217 break; 218 break;
218 case FilterOperation::ZOOM: { 219 case FilterOperation::ZOOM: {
219 skia::RefPtr<SkImageFilter> zoom_filter = 220 skia::RefPtr<SkImageFilter> zoom_filter =
220 skia::AdoptRef(SkMagnifierImageFilter::Create( 221 skia::AdoptRef(SkMagnifierImageFilter::Create(
221 SkRect::MakeXYWH( 222 SkRect::MakeXYWH(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 image_filter = alpha_filter; 274 image_filter = alpha_filter;
274 } 275 }
275 break; 276 break;
276 } 277 }
277 } 278 }
278 } 279 }
279 return image_filter; 280 return image_filter;
280 } 281 }
281 282
282 } // namespace cc 283 } // 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