Add FPDF_ANNOT in PDFiumEngine::GetRenderingFlags.
This is a preparation CL for implementing toggle annotation button. FPDF_ANNOT flag is needed to draw non-widget type PDF annotations, such as text, highlight, underline, etc. Same flag needs to be passed to FPDF_RenderPageBitmap_Start and FPDF_FFLDraw in order to display / hide popup window associated to non-widget annotation on mouse-hover. BUG=642982 Review-Url: https://codereview.chromium.org/2328893002 Cr-Commit-Position: refs/heads/master@{#417745}
This commit is contained in:
pdf/pdfium
@ -551,6 +551,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Client* client)
|
||||
most_visible_page_(-1),
|
||||
called_do_document_action_(false),
|
||||
render_grayscale_(false),
|
||||
render_annots_(true),
|
||||
progressive_paint_timeout_(0),
|
||||
getting_password_(false) {
|
||||
find_factory_.Initialize(this);
|
||||
@ -2986,6 +2987,8 @@ int PDFiumEngine::GetRenderingFlags() const {
|
||||
flags |= FPDF_GRAYSCALE;
|
||||
if (client_->IsPrintPreview())
|
||||
flags |= FPDF_PRINTING;
|
||||
if (render_annots_)
|
||||
flags |= FPDF_ANNOT;
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@ -699,6 +699,9 @@ class PDFiumEngine : public PDFEngine,
|
||||
// Whether to render in grayscale or in color.
|
||||
bool render_grayscale_;
|
||||
|
||||
// Whether to render PDF annotations.
|
||||
bool render_annots_;
|
||||
|
||||
// The link currently under the cursor.
|
||||
std::string link_under_cursor_;
|
||||
|
||||
|
Reference in New Issue
Block a user