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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp

Issue 2795413003: Rewrite references to "wtf/" to "platform/wtf/" in platform/fonts. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "SkiaTextMetrics.h" 5 #include "SkiaTextMetrics.h"
6 6
7 #include "wtf/MathExtras.h" 7 #include "platform/wtf/MathExtras.h"
8 8
9 #include <SkPath.h> 9 #include <SkPath.h>
10 10
11 namespace blink { 11 namespace blink {
12 12
13 static hb_position_t SkiaScalarToHarfBuzzPosition(SkScalar value) { 13 static hb_position_t SkiaScalarToHarfBuzzPosition(SkScalar value) {
14 // We treat HarfBuzz hb_position_t as 16.16 fixed-point. 14 // We treat HarfBuzz hb_position_t as 16.16 fixed-point.
15 static const int kHbPosition1 = 1 << 16; 15 static const int kHbPosition1 = 1 << 16;
16 return clampTo<int>(value * kHbPosition1); 16 return clampTo<int>(value * kHbPosition1);
17 } 17 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 SkScalar skWidth; 81 SkScalar skWidth;
82 m_paint->getTextWidths(&glyph, sizeof(glyph), &skWidth, nullptr); 82 m_paint->getTextWidths(&glyph, sizeof(glyph), &skWidth, nullptr);
83 83
84 if (!m_paint->isSubpixelText()) 84 if (!m_paint->isSubpixelText())
85 skWidth = SkScalarRoundToInt(skWidth); 85 skWidth = SkScalarRoundToInt(skWidth);
86 86
87 return SkScalarToFloat(skWidth); 87 return SkScalarToFloat(skWidth);
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698