| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkDataTable.h" | 8 #include "SkDataTable.h" |
| 9 #include "SkDWrite.h" | 9 #include "SkDWrite.h" |
| 10 #include "SkDWriteFontFileStream.h" | 10 #include "SkDWriteFontFileStream.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return this->matchIndexStyle(index, style); | 283 return this->matchIndexStyle(index, style); |
| 284 } | 284 } |
| 285 | 285 |
| 286 class FontFallbackRenderer : public IDWriteTextRenderer { | 286 class FontFallbackRenderer : public IDWriteTextRenderer { |
| 287 public: | 287 public: |
| 288 FontFallbackRenderer(const SkRemotableFontMgr_DirectWrite* outer, UINT32
character) | 288 FontFallbackRenderer(const SkRemotableFontMgr_DirectWrite* outer, UINT32
character) |
| 289 : fRefCount(1), fOuter(SkSafeRef(outer)), fCharacter(character) { | 289 : fRefCount(1), fOuter(SkSafeRef(outer)), fCharacter(character) { |
| 290 fIdentity.fDataId = SkFontIdentity::kInvalidDataId; | 290 fIdentity.fDataId = SkFontIdentity::kInvalidDataId; |
| 291 } | 291 } |
| 292 | 292 |
| 293 virtual ~FontFallbackRenderer() { } |
| 294 |
| 293 // IDWriteTextRenderer methods | 295 // IDWriteTextRenderer methods |
| 294 virtual HRESULT STDMETHODCALLTYPE DrawGlyphRun( | 296 virtual HRESULT STDMETHODCALLTYPE DrawGlyphRun( |
| 295 void* clientDrawingContext, | 297 void* clientDrawingContext, |
| 296 FLOAT baselineOriginX, | 298 FLOAT baselineOriginX, |
| 297 FLOAT baselineOriginY, | 299 FLOAT baselineOriginY, |
| 298 DWRITE_MEASURING_MODE measuringMode, | 300 DWRITE_MEASURING_MODE measuringMode, |
| 299 DWRITE_GLYPH_RUN const* glyphRun, | 301 DWRITE_GLYPH_RUN const* glyphRun, |
| 300 DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, | 302 DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, |
| 301 IUnknown* clientDrawingEffect) SK_OVERRIDE | 303 IUnknown* clientDrawingEffect) SK_OVERRIDE |
| 302 { | 304 { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } else { | 518 } else { |
| 517 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); | 519 localeNameLen = getUserDefaultLocaleNameProc(localeNameStorage, LOCALE_N
AME_MAX_LENGTH); |
| 518 if (localeNameLen) { | 520 if (localeNameLen) { |
| 519 localeName = localeNameStorage; | 521 localeName = localeNameStorage; |
| 520 }; | 522 }; |
| 521 } | 523 } |
| 522 | 524 |
| 523 return SkNEW_ARGS(SkRemotableFontMgr_DirectWrite, (sysFontCollection.get(), | 525 return SkNEW_ARGS(SkRemotableFontMgr_DirectWrite, (sysFontCollection.get(), |
| 524 localeName, localeNameLen
)); | 526 localeName, localeNameLen
)); |
| 525 } | 527 } |
| OLD | NEW |