Index: chrome/renderer/print_web_view_helper_win.cc |
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc |
index f81b93a79c801089f3dcc4145ebf035d5a7fd0b8..72e3399f42e3a596a7f56ec4a6a767ea07c57ad9 100644 |
--- a/chrome/renderer/print_web_view_helper_win.cc |
+++ b/chrome/renderer/print_web_view_helper_win.cc |
@@ -209,6 +209,9 @@ void PrintWebViewHelper::RenderPage( |
int width = static_cast<int>(content_width_in_points * params.max_shrink); |
int height = static_cast<int>(content_height_in_points * params.max_shrink); |
+ bool result = (*metafile)->StartPage(); |
+ DCHECK(result); |
+ |
#if 0 |
// TODO(maruel): This code is kept for testing until the 100% GDI drawing |
// code is stable. maruels use this code's output as a reference when the |
@@ -255,6 +258,9 @@ void PrintWebViewHelper::RenderPage( |
} |
#endif |
+ result = (*metafile)->FinishPage(); |
+ DCHECK(result); |
+ |
skia::VectorPlatformDevice* platform_device = |
static_cast<skia::VectorPlatformDevice*>(canvas.getDevice()); |
if (platform_device->alpha_blend_used() && !params.supports_alpha_blend) { |