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

Side by Side Diff: ui/gfx/image/image_skia_operations.cc

Issue 10808072: ui: No need to typedef testing::Test in unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typos Created 8 years, 4 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 | « ui/gfx/font_list_unittest.cc ('k') | ui/gfx/image/image_skia_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ui/gfx/image/image_skia_operations.h" 5 #include "ui/gfx/image/image_skia_operations.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "skia/ext/image_operations.h" 9 #include "skia/ext/image_operations.h"
10 #include "skia/ext/platform_canvas.h" 10 #include "skia/ext/platform_canvas.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return ImageSkiaRep(shaodw_bitmap, image_rep.scale_factor()); 279 return ImageSkiaRep(shaodw_bitmap, image_rep.scale_factor());
280 } 280 }
281 281
282 private: 282 private:
283 const ImageSkia source_; 283 const ImageSkia source_;
284 const ShadowValues shaodws_in_dip_; 284 const ShadowValues shaodws_in_dip_;
285 285
286 DISALLOW_COPY_AND_ASSIGN(DropShadowSource); 286 DISALLOW_COPY_AND_ASSIGN(DropShadowSource);
287 }; 287 };
288 288
289 } // namespace; 289 } // namespace
290 290
291 // static 291 // static
292 ImageSkia ImageSkiaOperations::CreateBlendedImage(const ImageSkia& first, 292 ImageSkia ImageSkiaOperations::CreateBlendedImage(const ImageSkia& first,
293 const ImageSkia& second, 293 const ImageSkia& second,
294 double alpha) { 294 double alpha) {
295 return ImageSkia(new BlendingImageSource(first, second, alpha), first.size()); 295 return ImageSkia(new BlendingImageSource(first, second, alpha), first.size());
296 } 296 }
297 297
298 // static 298 // static
299 ImageSkia ImageSkiaOperations::CreateMaskedImage(const ImageSkia& rgb, 299 ImageSkia ImageSkiaOperations::CreateMaskedImage(const ImageSkia& rgb,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 const ImageSkia& source, 339 const ImageSkia& source,
340 const ShadowValues& shadows) { 340 const ShadowValues& shadows) {
341 const gfx::Insets shadow_padding = -gfx::ShadowValue::GetMargin(shadows); 341 const gfx::Insets shadow_padding = -gfx::ShadowValue::GetMargin(shadows);
342 gfx::Size shadow_image_size = source.size(); 342 gfx::Size shadow_image_size = source.size();
343 shadow_image_size.Enlarge(shadow_padding.width(), 343 shadow_image_size.Enlarge(shadow_padding.width(),
344 shadow_padding.height()); 344 shadow_padding.height());
345 return ImageSkia(new DropShadowSource(source, shadows), shadow_image_size); 345 return ImageSkia(new DropShadowSource(source, shadows), shadow_image_size);
346 } 346 }
347 347
348 } // namespace gfx 348 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/font_list_unittest.cc ('k') | ui/gfx/image/image_skia_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698