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

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

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/output/gl_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc.rej » ('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 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 "cc/output/filter_operation.h" 9 #include "cc/output/filter_operation.h"
10 #include "cc/output/filter_operations.h" 10 #include "cc/output/filter_operations.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 image_filter = skia::AdoptRef(SkBlurImageFilter::Create( 199 image_filter = skia::AdoptRef(SkBlurImageFilter::Create(
200 op.amount(), op.amount(), image_filter.get())); 200 op.amount(), op.amount(), image_filter.get()));
201 break; 201 break;
202 case FilterOperation::DROP_SHADOW: 202 case FilterOperation::DROP_SHADOW:
203 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create( 203 image_filter = skia::AdoptRef(SkDropShadowImageFilter::Create(
204 SkIntToScalar(op.drop_shadow_offset().x()), 204 SkIntToScalar(op.drop_shadow_offset().x()),
205 SkIntToScalar(op.drop_shadow_offset().y()), 205 SkIntToScalar(op.drop_shadow_offset().y()),
206 SkIntToScalar(op.amount()), 206 SkIntToScalar(op.amount()),
207 SkIntToScalar(op.amount()), 207 SkIntToScalar(op.amount()),
208 op.drop_shadow_color(), 208 op.drop_shadow_color(),
209 SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode,
209 image_filter.get())); 210 image_filter.get()));
210 break; 211 break;
211 case FilterOperation::COLOR_MATRIX: 212 case FilterOperation::COLOR_MATRIX:
212 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter); 213 image_filter = CreateMatrixImageFilter(op.matrix(), image_filter);
213 break; 214 break;
214 case FilterOperation::ZOOM: { 215 case FilterOperation::ZOOM: {
215 skia::RefPtr<SkImageFilter> zoom_filter = 216 skia::RefPtr<SkImageFilter> zoom_filter =
216 skia::AdoptRef(SkMagnifierImageFilter::Create( 217 skia::AdoptRef(SkMagnifierImageFilter::Create(
217 SkRect::MakeXYWH( 218 SkRect::MakeXYWH(
218 (size.width() - (size.width() / op.amount())) / 2.f, 219 (size.width() - (size.width() / op.amount())) / 2.f,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 image_filter = alpha_filter; 270 image_filter = alpha_filter;
270 } 271 }
271 break; 272 break;
272 } 273 }
273 } 274 }
274 } 275 }
275 return image_filter; 276 return image_filter;
276 } 277 }
277 278
278 } // namespace cc 279 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc.rej » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698