diff options
author | caryclark <caryclark@google.com> | 2016-11-21 04:41:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-21 04:41:31 -0800 |
commit | a1053a07ab1fe8c799acb4a46a61588616d85c5a (patch) | |
tree | 4a3bbe412b118ec1c206d782ea3b999c7c0f0323 /core/fxge/ge/cfx_facecache.cpp | |
parent | d8f710cedd62c1d28beee15d7dc3d31ddd148437 (diff) | |
download | pdfium-a1053a07ab1fe8c799acb4a46a61588616d85c5a.tar.xz |
use skia text
This adds text to the _SUPPORT_SKIA_PATHS_
variant.
The output of the test corpus has more
differences, but no feature changes or
dropouts that I can see.
The text is a bit lighter. Bungeman thinks
this is because of our support of SRGB
color, although the fonts also look different
so maybe there's more to the story.
The output looks compatible with the
variations I see in Adobe Reader and Firefox
on the same platform.
There's probably more text tuning to do.
Additionally, this turns off the caching
feature for this variation. Caching can't
work because the drawing alternates between
Skia and PDFium's native blits, so any
state caching won't know about changes
and drawing performed by the other.
R=dsinclair@chromium.org, bungeman@chromium.org
Review-Url: https://codereview.chromium.org/2520483002
Diffstat (limited to 'core/fxge/ge/cfx_facecache.cpp')
-rw-r--r-- | core/fxge/ge/cfx_facecache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp index e7e6e0e42c..942814b75a 100644 --- a/core/fxge/ge/cfx_facecache.cpp +++ b/core/fxge/ge/cfx_facecache.cpp @@ -16,7 +16,7 @@ #include "core/fxge/ge/fx_text_int.h" #include "third_party/base/numerics/safe_math.h" -#ifdef _SKIA_SUPPORT_ +#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ #include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkTypeface.h" #endif @@ -76,7 +76,7 @@ void ContrastAdjust(uint8_t* pDataIn, CFX_FaceCache::CFX_FaceCache(FXFT_Face face) : m_Face(face) -#ifdef _SKIA_SUPPORT_ +#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ , m_pTypeface(nullptr) #endif @@ -84,7 +84,7 @@ CFX_FaceCache::CFX_FaceCache(FXFT_Face face) } CFX_FaceCache::~CFX_FaceCache() { -#ifdef _SKIA_SUPPORT_ +#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ SkSafeUnref(m_pTypeface); #endif } @@ -300,7 +300,8 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(const CFX_Font* pFont, } #endif CFX_ByteString FaceGlyphsKey(keygen.m_Key, keygen.m_KeyLen); -#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ +#if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ || defined _SKIA_SUPPORT_ || \ + defined _SKIA_SUPPORT_PATHS_ return LookUpGlyphBitmap(pFont, pMatrix, FaceGlyphsKey, glyph_index, bFontStyle, dest_width, anti_alias); #else @@ -348,7 +349,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(const CFX_Font* pFont, #endif } -#ifdef _SKIA_SUPPORT_ +#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) { if (!m_pTypeface) { m_pTypeface = |