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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 6673035: Move Start/EndPage() from NewPage/PageDone() to inside the metafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added StartPage/FinishPage (metafile functions) calls in print_web_view_helper_win.cc Created 9 years, 9 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 | printing/printing_context_win.cc » ('j') | printing/printing_context_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e0332c85dbe012922bf7ad6da7f965fe8cf0f644..cde39ae97ff51fe6655d44da93433b4d6f220bc3 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -208,6 +208,8 @@ 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);
+ DCHECK((*metafile)->StartPage());
vandebo (ex-Chrome) 2011/03/15 20:41:39 Better to do bool foo = action; DCHECK(foo);
dpapad 2011/03/15 20:56:44 Done.
+
#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
@@ -254,6 +256,7 @@ void PrintWebViewHelper::RenderPage(
}
#endif
+ DCHECK((*metafile)->EndPage());
skia::VectorPlatformDevice* platform_device =
static_cast<skia::VectorPlatformDevice*>(canvas.getDevice());
if (platform_device->alpha_blend_used() && !params.supports_alpha_blend) {
« no previous file with comments | « no previous file | printing/printing_context_win.cc » ('j') | printing/printing_context_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698