OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 GlyphBufferBloberizer(const GlyphBuffer& buffer, | 252 GlyphBufferBloberizer(const GlyphBuffer& buffer, |
253 const Font* font, | 253 const Font* font, |
254 float deviceScaleFactor) | 254 float deviceScaleFactor) |
255 : m_buffer(buffer), | 255 : m_buffer(buffer), |
256 m_font(font), | 256 m_font(font), |
257 m_deviceScaleFactor(deviceScaleFactor), | 257 m_deviceScaleFactor(deviceScaleFactor), |
258 m_hasVerticalOffsets(buffer.hasVerticalOffsets()), | 258 m_hasVerticalOffsets(buffer.hasVerticalOffsets()), |
259 m_index(0), | 259 m_index(0), |
260 m_endIndex(m_buffer.size()), | 260 m_endIndex(m_buffer.size()), |
261 m_blobCount(0), | 261 m_blobCount(0), |
262 m_rotation(buffer.isEmpty() ? NoRotation : computeBlobRotation( | 262 m_rotation(buffer.isEmpty() |
263 buffer.fontDataAt(0))) {} | 263 ? NoRotation |
| 264 : computeBlobRotation(buffer.fontDataAt(0))) {} |
264 | 265 |
265 bool done() const { return m_index >= m_endIndex; } | 266 bool done() const { return m_index >= m_endIndex; } |
266 unsigned blobCount() const { return m_blobCount; } | 267 unsigned blobCount() const { return m_blobCount; } |
267 | 268 |
268 std::pair<sk_sp<SkTextBlob>, BlobRotation> next() { | 269 std::pair<sk_sp<SkTextBlob>, BlobRotation> next() { |
269 ASSERT(!done()); | 270 ASSERT(!done()); |
270 const BlobRotation currentRotation = m_rotation; | 271 const BlobRotation currentRotation = m_rotation; |
271 | 272 |
272 while (m_index < m_endIndex) { | 273 while (m_index < m_endIndex) { |
273 const SimpleFontData* fontData = m_buffer.fontDataAt(m_index); | 274 const SimpleFontData* fontData = m_buffer.fontDataAt(m_index); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 | 611 |
611 bool Font::loadingCustomFonts() const { | 612 bool Font::loadingCustomFonts() const { |
612 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); | 613 return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts(); |
613 } | 614 } |
614 | 615 |
615 bool Font::isFallbackValid() const { | 616 bool Font::isFallbackValid() const { |
616 return !m_fontFallbackList || m_fontFallbackList->isValid(); | 617 return !m_fontFallbackList || m_fontFallbackList->isValid(); |
617 } | 618 } |
618 | 619 |
619 } // namespace blink | 620 } // namespace blink |
OLD | NEW |