diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-12-17 13:41:13 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-12-17 13:41:13 -0800 |
commit | 979ddd8e4d331b330360f321b7b0c1acaead6445 (patch) | |
tree | 473af0a917597b08b66c4154cfd4c8e5fdd0a923 /core/src/fpdfdoc/doc_annot.cpp | |
parent | 1871821653de9f4b1706d726f4d318cf739e55af (diff) | |
download | pdfium-979ddd8e4d331b330360f321b7b0c1acaead6445.tar.xz |
Merge to XFA: Tidy CPDF_RenderContext
Original Review URL: https://codereview.chromium.org/1536623004 .
(cherry picked from commit 761660c4074269ac806d06c9bef70e4e9fb0eb29)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1531423002 .
Diffstat (limited to 'core/src/fpdfdoc/doc_annot.cpp')
-rw-r--r-- | core/src/fpdfdoc/doc_annot.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp index 8f3d7f99eb..f4a75e6afc 100644 --- a/core/src/fpdfdoc/doc_annot.cpp +++ b/core/src/fpdfdoc/doc_annot.cpp @@ -46,7 +46,7 @@ CPDF_AnnotList::~CPDF_AnnotList() { delete annot; } -void CPDF_AnnotList::DisplayPass(const CPDF_Page* pPage, +void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, CFX_RenderDevice* pDevice, CPDF_RenderContext* pContext, FX_BOOL bPrinting, @@ -97,7 +97,7 @@ void CPDF_AnnotList::DisplayPass(const CPDF_Page* pPage, } } -void CPDF_AnnotList::DisplayAnnots(const CPDF_Page* pPage, +void CPDF_AnnotList::DisplayAnnots(CPDF_Page* pPage, CFX_RenderDevice* pDevice, CPDF_RenderContext* pContext, FX_BOOL bPrinting, @@ -216,7 +216,7 @@ static CPDF_Form* FPDFDOC_Annot_GetMatrix(const CPDF_Page* pPage, matrix.Concat(*pUser2Device); return pForm; } -FX_BOOL CPDF_Annot::DrawAppearance(const CPDF_Page* pPage, +FX_BOOL CPDF_Annot::DrawAppearance(CPDF_Page* pPage, CFX_RenderDevice* pDevice, const CFX_Matrix* pUser2Device, AppearanceMode mode, @@ -227,13 +227,12 @@ FX_BOOL CPDF_Annot::DrawAppearance(const CPDF_Page* pPage, if (!pForm) { return FALSE; } - CPDF_RenderContext context; - context.Create((CPDF_Page*)pPage); + CPDF_RenderContext context(pPage); context.DrawObjectList(pDevice, pForm, &matrix, pOptions); return TRUE; } FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage, - const CPDF_RenderContext* pContext, + CPDF_RenderContext* pContext, const CFX_Matrix* pUser2Device, AppearanceMode mode) { CFX_Matrix matrix; @@ -242,7 +241,7 @@ FX_BOOL CPDF_Annot::DrawInContext(const CPDF_Page* pPage, if (!pForm) { return FALSE; } - ((CPDF_RenderContext*)pContext)->AppendObjectList(pForm, &matrix); + pContext->AppendObjectList(pForm, &matrix); return TRUE; } void CPDF_Annot::DrawBorder(CFX_RenderDevice* pDevice, |