diff options
author | Lei Zhang <thestig@chromium.org> | 2018-02-07 20:28:35 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-07 20:28:35 +0000 |
commit | a98e36657d0e5a78e216f828b3e712e85250c1a7 (patch) | |
tree | 4621be8a3be00efafe28eea4639b87675db80d2b /core/fpdfapi/render | |
parent | 2496f8e3f3cb1cbfffd664c9b5d7983dc192887b (diff) | |
download | pdfium-a98e36657d0e5a78e216f828b3e712e85250c1a7.tar.xz |
Clean up RenderPage methods in EmbedderTest.
Add replacement methods that make themselves clear as to what they are
rendering, and return unique_ptrs to help prevent leakage. Mark existing
methods deprecated.
Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d
Reviewed-on: https://pdfium-review.googlesource.com/25470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp b/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp index 5b7cbc6f05..caf4673b85 100644 --- a/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp +++ b/core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp @@ -13,7 +13,7 @@ TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_554151) { EXPECT_TRUE(OpenDocument("bug_554151.pdf")); FPDF_PAGE page = LoadPage(0); EXPECT_NE(nullptr, page); - FPDF_BITMAP bitmap = RenderPage(page); + FPDF_BITMAP bitmap = RenderPageDeprecated(page); CompareBitmap(bitmap, 612, 792, "a14d7ee573c1b2456d7bf6b7762823cf"); FPDFBitmap_Destroy(bitmap); UnloadPage(page); @@ -24,7 +24,7 @@ TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_557223) { EXPECT_TRUE(OpenDocument("bug_557223.pdf")); FPDF_PAGE page = LoadPage(0); EXPECT_NE(nullptr, page); - FPDF_BITMAP bitmap = RenderPage(page); + FPDF_BITMAP bitmap = RenderPageDeprecated(page); CompareBitmap(bitmap, 24, 24, "dc0ea1b743c2edb22c597cadc8537f7b"); FPDFBitmap_Destroy(bitmap); UnloadPage(page); @@ -35,7 +35,7 @@ TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_603518) { EXPECT_TRUE(OpenDocument("bug_603518.pdf")); FPDF_PAGE page = LoadPage(0); EXPECT_NE(nullptr, page); - FPDF_BITMAP bitmap = RenderPage(page); + FPDF_BITMAP bitmap = RenderPageDeprecated(page); CompareBitmap(bitmap, 749, 749, "b9e75190cdc5edf0069a408744ca07dc"); FPDFBitmap_Destroy(bitmap); UnloadPage(page); diff --git a/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp b/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp index ed6da46f2a..f141590f46 100644 --- a/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp +++ b/core/fpdfapi/render/fpdf_render_pattern_embeddertest.cpp @@ -11,7 +11,7 @@ TEST_F(FPDFRenderPatternEmbeddertest, LoadError_547706) { // Test shading where object is a dictionary instead of a stream. EXPECT_TRUE(OpenDocument("bug_547706.pdf")); FPDF_PAGE page = LoadPage(0); - FPDF_BITMAP bitmap = RenderPage(page); + FPDF_BITMAP bitmap = RenderPageDeprecated(page); CompareBitmap(bitmap, 612, 792, "1940568c9ba33bac5d0b1ee9558c76b3"); FPDFBitmap_Destroy(bitmap); UnloadPage(page); |