Index: pdf/pdfium/pdfium_engine.cc |
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
index 4c5ba21d31a7163f683948f76bd1e950f7c4e0e6..15e4a4850092082c4e81d75e0f81ab9204db4b72 100644 |
--- a/pdf/pdfium/pdfium_engine.cc |
+++ b/pdf/pdfium/pdfium_engine.cc |
@@ -2366,6 +2366,14 @@ int PDFiumEngine::GetNumberOfPages() { |
return pages_.size(); |
} |
+uint32 PDFiumEngine::GetBackgroundColor() { |
+ return background_color_; |
+} |
+ |
+void PDFiumEngine::SetBackgroundColor(uint32 background_color) { |
+ background_color_ = background_color; |
+} |
+ |
pp::VarArray PDFiumEngine::GetBookmarks() { |
pp::VarDictionary dict = TraverseBookmarks(doc_, NULL); |
// The root bookmark contains no useful information. |
@@ -2937,7 +2945,7 @@ void PDFiumEngine::FillPageSides(int progressive_index) { |
FPDFBitmap_FillRect(bitmap, left.x() - dirty_in_screen.x(), |
left.y() - dirty_in_screen.y(), left.width(), |
- left.height(), kBackgroundColor); |
+ left.height(), background_color_); |
} |
if (page_rect.right() < document_size_.width()) { |
@@ -2951,7 +2959,7 @@ void PDFiumEngine::FillPageSides(int progressive_index) { |
FPDFBitmap_FillRect(bitmap, right.x() - dirty_in_screen.x(), |
right.y() - dirty_in_screen.y(), right.width(), |
- right.height(), kBackgroundColor); |
+ right.height(), background_color_); |
} |
// Paint separator. |
@@ -2963,7 +2971,7 @@ void PDFiumEngine::FillPageSides(int progressive_index) { |
FPDFBitmap_FillRect(bitmap, bottom.x() - dirty_in_screen.x(), |
bottom.y() - dirty_in_screen.y(), bottom.width(), |
- bottom.height(), kBackgroundColor); |
+ bottom.height(), background_color_); |
} |
void PDFiumEngine::PaintPageShadow(int progressive_index, |
@@ -3415,7 +3423,7 @@ void PDFiumEngine::DrawPageShadow(const pp::Rect& page_rc, |
// We need to check depth only to verify our copy of shadow matrix is correct. |
if (!page_shadow_.get() || page_shadow_->depth() != depth) |
- page_shadow_.reset(new ShadowMatrix(depth, factor, kBackgroundColor)); |
+ page_shadow_.reset(new ShadowMatrix(depth, factor, background_color_)); |
DCHECK(!image_data->is_null()); |
DrawShadow(image_data, shadow_rect, page_rect, clip_rect, *page_shadow_); |