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

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

Issue 2661353002: ui/gfx: split out code that depends on paint (Closed)
Patch Set: Fix mac, chromeos build Created 3 years, 10 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 | « ui/gfx/canvas.cc ('k') | ui/gfx/render_text.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 <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"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "skia/ext/image_operations.h" 12 #include "skia/ext/image_operations.h"
13 #include "third_party/skia/include/core/SkClipOp.h" 13 #include "third_party/skia/include/core/SkClipOp.h"
14 #include "third_party/skia/include/core/SkDrawLooper.h" 14 #include "third_party/skia/include/core/SkDrawLooper.h"
15 #include "ui/gfx/canvas.h" 15 #include "ui/gfx/canvas.h"
16 #include "ui/gfx/geometry/insets.h" 16 #include "ui/gfx/geometry/insets.h"
17 #include "ui/gfx/geometry/point.h" 17 #include "ui/gfx/geometry/point.h"
18 #include "ui/gfx/geometry/point_conversions.h" 18 #include "ui/gfx/geometry/point_conversions.h"
19 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/geometry/rect_conversions.h" 20 #include "ui/gfx/geometry/rect_conversions.h"
21 #include "ui/gfx/geometry/size.h" 21 #include "ui/gfx/geometry/size.h"
22 #include "ui/gfx/geometry/size_conversions.h" 22 #include "ui/gfx/geometry/size_conversions.h"
23 #include "ui/gfx/image/canvas_image_source.h" 23 #include "ui/gfx/image/canvas_image_source.h"
24 #include "ui/gfx/image/image_skia.h" 24 #include "ui/gfx/image/image_skia.h"
25 #include "ui/gfx/image/image_skia_rep.h" 25 #include "ui/gfx/image/image_skia_rep.h"
26 #include "ui/gfx/image/image_skia_source.h" 26 #include "ui/gfx/image/image_skia_source.h"
27 #include "ui/gfx/skbitmap_operations.h" 27 #include "ui/gfx/skbitmap_operations.h"
28 #include "ui/gfx/skia_paint_util.h"
28 #include "ui/gfx/skia_util.h" 29 #include "ui/gfx/skia_util.h"
29 30
30 namespace gfx { 31 namespace gfx {
31 namespace { 32 namespace {
32 33
33 gfx::Size DIPToPixelSize(gfx::Size dip_size, float scale) { 34 gfx::Size DIPToPixelSize(gfx::Size dip_size, float scale) {
34 return ScaleToCeiledSize(dip_size, scale); 35 return ScaleToCeiledSize(dip_size, scale);
35 } 36 }
36 37
37 gfx::Rect DIPToPixelBounds(gfx::Rect dip_bounds, float scale) { 38 gfx::Rect DIPToPixelBounds(gfx::Rect dip_bounds, float scale) {
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 if (icon.isNull()) 618 if (icon.isNull())
618 return ImageSkia(); 619 return ImageSkia();
619 620
620 if (badge.isNull()) 621 if (badge.isNull())
621 return icon; 622 return icon;
622 623
623 return ImageSkia(new IconWithBadgeSource(icon, badge), icon.size()); 624 return ImageSkia(new IconWithBadgeSource(icon, badge), icon.size());
624 } 625 }
625 626
626 } // namespace gfx 627 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698