summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_defaultappearance.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-04-03 19:52:27 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-03 19:52:27 +0000
commit28bb2f2ffe751cf4142329e27238da52ae9f848b (patch)
tree99229667c2b702b79f24d60faea4f89457e4ff32 /core/fpdfdoc/cpdf_defaultappearance.h
parent4c22dd5690cdec725389055bb7c07c300a4b6fe4 (diff)
downloadpdfium-28bb2f2ffe751cf4142329e27238da52ae9f848b.tar.xz
Remove DefaultAppearance HasColor and return an optional instead
This CL converts CPDF_DefaultAppearance to return Optional<CFX_Color:Type> items instead of having a HasColor. This saves the double parse of the appearance stream. Change-Id: Ib3c136da6e2adfb559e495de1d299cce0b4ad25f Reviewed-on: https://pdfium-review.googlesource.com/29630 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpdf_defaultappearance.h')
-rw-r--r--core/fpdfdoc/cpdf_defaultappearance.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_defaultappearance.h b/core/fpdfdoc/cpdf_defaultappearance.h
index ae3c4f5517..73e35c7cd4 100644
--- a/core/fpdfdoc/cpdf_defaultappearance.h
+++ b/core/fpdfdoc/cpdf_defaultappearance.h
@@ -27,9 +27,8 @@ class CPDF_DefaultAppearance {
Optional<ByteString> GetFont(float* fFontSize);
- bool HasColor();
- CFX_Color::Type GetColor(float fc[4]);
- std::pair<CFX_Color::Type, FX_ARGB> GetColor();
+ Optional<CFX_Color::Type> GetColor(float fc[4]);
+ std::pair<Optional<CFX_Color::Type>, FX_ARGB> GetColor();
bool FindTagParamFromStartForTesting(CPDF_SimpleParser* parser,
const ByteStringView& token,