| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 gfx::Size shadow_image_size = source.size(); | 587 gfx::Size shadow_image_size = source.size(); |
| 588 shadow_image_size.Enlarge(shadow_padding.width(), | 588 shadow_image_size.Enlarge(shadow_padding.width(), |
| 589 shadow_padding.height()); | 589 shadow_padding.height()); |
| 590 return ImageSkia(new DropShadowSource(source, shadows), shadow_image_size); | 590 return ImageSkia(new DropShadowSource(source, shadows), shadow_image_size); |
| 591 } | 591 } |
| 592 | 592 |
| 593 // static | 593 // static |
| 594 ImageSkia ImageSkiaOperations::CreateHorizontalShadow( | 594 ImageSkia ImageSkiaOperations::CreateHorizontalShadow( |
| 595 const std::vector<ShadowValue>& shadows, | 595 const std::vector<ShadowValue>& shadows, |
| 596 bool fades_down) { | 596 bool fades_down) { |
| 597 auto source = new HorizontalShadowSource(shadows, fades_down); | 597 auto* source = new HorizontalShadowSource(shadows, fades_down); |
| 598 return ImageSkia(source, source->size()); | 598 return ImageSkia(source, source->size()); |
| 599 } | 599 } |
| 600 | 600 |
| 601 // static | 601 // static |
| 602 ImageSkia ImageSkiaOperations::CreateRotatedImage( | 602 ImageSkia ImageSkiaOperations::CreateRotatedImage( |
| 603 const ImageSkia& source, | 603 const ImageSkia& source, |
| 604 SkBitmapOperations::RotationAmount rotation) { | 604 SkBitmapOperations::RotationAmount rotation) { |
| 605 if (source.isNull()) | 605 if (source.isNull()) |
| 606 return ImageSkia(); | 606 return ImageSkia(); |
| 607 | 607 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 618 if (icon.isNull()) | 618 if (icon.isNull()) |
| 619 return ImageSkia(); | 619 return ImageSkia(); |
| 620 | 620 |
| 621 if (badge.isNull()) | 621 if (badge.isNull()) |
| 622 return icon; | 622 return icon; |
| 623 | 623 |
| 624 return ImageSkia(new IconWithBadgeSource(icon, badge), icon.size()); | 624 return ImageSkia(new IconWithBadgeSource(icon, badge), icon.size()); |
| 625 } | 625 } |
| 626 | 626 |
| 627 } // namespace gfx | 627 } // namespace gfx |
| OLD | NEW |