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

Side by Side Diff: ui/gfx/skia_util.cc

Issue 2752693002: Factor gfx::Transform and skia_util into their own component. (Closed)
Patch Set: none Created 3 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 | « ui/gfx/skia_util.h ('k') | 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 (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/skia_util.h" 5 #include "ui/gfx/skia_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
11 #include "base/numerics/safe_math.h" 11 #include "base/numerics/safe_math.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
13 #include "third_party/skia/include/core/SkColorPriv.h" 13 #include "third_party/skia/include/core/SkColorPriv.h"
14 #include "third_party/skia/include/core/SkUnPreMultiply.h" 14 #include "third_party/skia/include/core/SkUnPreMultiply.h"
15 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" 15 #include "third_party/skia/include/effects/SkBlurMaskFilter.h"
16 #include "third_party/skia/include/effects/SkGradientShader.h" 16 #include "third_party/skia/include/effects/SkGradientShader.h"
17 #include "third_party/skia/include/effects/SkLayerDrawLooper.h" 17 #include "third_party/skia/include/effects/SkLayerDrawLooper.h"
18 #include "ui/gfx/geometry/quad_f.h" 18 #include "ui/gfx/geometry/quad_f.h"
19 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/geometry/rect_f.h" 20 #include "ui/gfx/geometry/rect_f.h"
21 #include "ui/gfx/image/image_skia_rep.h"
22 #include "ui/gfx/shadow_value.h"
23 #include "ui/gfx/transform.h" 21 #include "ui/gfx/transform.h"
24 22
25 namespace gfx { 23 namespace gfx {
26 24
27 SkPoint PointToSkPoint(const Point& point) { 25 SkPoint PointToSkPoint(const Point& point) {
28 return SkPoint::Make(SkIntToScalar(point.x()), SkIntToScalar(point.y())); 26 return SkPoint::Make(SkIntToScalar(point.x()), SkIntToScalar(point.y()));
29 } 27 }
30 28
31 SkIPoint PointToSkIPoint(const Point& point) { 29 SkIPoint PointToSkIPoint(const Point& point) {
32 return SkIPoint::Make(point.x(), point.y()); 30 return SkIPoint::Make(point.x(), point.y());
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 static const SkScalar kSkToHbRatio = SK_Scalar1 / kHbUnit1; 162 static const SkScalar kSkToHbRatio = SK_Scalar1 / kHbUnit1;
165 return kSkToHbRatio * value; 163 return kSkToHbRatio * value;
166 } 164 }
167 165
168 float HarfBuzzUnitsToFloat(int value) { 166 float HarfBuzzUnitsToFloat(int value) {
169 static const float kFloatToHbRatio = 1.0f / kHbUnit1; 167 static const float kFloatToHbRatio = 1.0f / kHbUnit1;
170 return kFloatToHbRatio * value; 168 return kFloatToHbRatio * value;
171 } 169 }
172 170
173 } // namespace gfx 171 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/skia_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698