Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: samples/pdfium_test.cc

Issue 1554883002: Revert "Fix a partial rendering problem" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | testing/embedder_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/pdfium_test.cc
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 89430f6dfdec8824c3fecb885951872a425bd69e..1b3d82659cd3beb455d196adcda1cb48d0c102c8 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -15,7 +15,6 @@
#include "image_diff_png.h"
#include "public/fpdf_dataavail.h"
-#include "public/fpdf_edit.h"
#include "public/fpdf_ext.h"
#include "public/fpdf_formfill.h"
#include "public/fpdf_text.h"
@@ -351,14 +350,14 @@ bool RenderPage(const std::string& name,
}
int width = static_cast<int>(FPDF_GetPageWidth(page) * scale);
int height = static_cast<int>(FPDF_GetPageHeight(page) * scale);
- int alpha = FPDFPage_HasTransparency(page) ? 1 : 0;
- FPDF_BITMAP bitmap = FPDFBitmap_Create(width, height, alpha);
+
+ FPDF_BITMAP bitmap = FPDFBitmap_Create(width, height, 0);
if (!bitmap) {
fprintf(stderr, "Page was too large to be rendered.\n");
return false;
}
- FPDF_DWORD fill_color = alpha ? 0x00000000 : 0xFFFFFFFF;
- FPDFBitmap_FillRect(bitmap, 0, 0, width, height, fill_color);
+
+ FPDFBitmap_FillRect(bitmap, 0, 0, width, height, 0xFFFFFFFF);
FPDF_RenderPageBitmap(bitmap, page, 0, 0, width, height, 0, 0);
FPDF_FFLDraw(form, bitmap, page, 0, 0, width, height, 0, 0);
« no previous file with comments | « no previous file | testing/embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698