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

Unified Diff: chrome/renderer/print_web_view_helper_win.cc

Issue 11410051: Moved AlphaBlend rasterization to renderer process like it was before 152681. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « chrome/browser/printing/print_view_manager.cc ('k') | no next file » | no next file with comments »
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 075ed6bca5fe7554adeb4fefaec58580579d22ed..bdc702bde889ef2bf357306dbee68200ab484a76 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -38,7 +38,7 @@ void PrintWebViewHelper::PrintPageInternal(
WebFrame* frame) {
// Generate a memory-based metafile. It will use the current screen's DPI.
// Each metafile contains a single page.
- scoped_ptr<Metafile> metafile(new printing::NativeMetafile);
+ scoped_ptr<printing::NativeMetafile> metafile(new printing::NativeMetafile);
metafile->Init();
DCHECK(metafile->context());
skia::InitializeDC(metafile->context());
@@ -62,6 +62,13 @@ void PrintWebViewHelper::PrintPageInternal(
if (!metafile->FinishDocument())
NOTREACHED();
+ if (!params.params.supports_alpha_blend && metafile->IsAlphaBlendUsed()) {
+ scoped_ptr<printing::NativeMetafile> raster_metafile(
+ metafile->RasterizeAlphaBlend());
+ if (raster_metafile.get())
+ metafile.swap(raster_metafile);
+ }
+
// Get the size of the compiled metafile.
uint32 buf_size = metafile->GetDataSize();
DCHECK_GT(buf_size, 128u);
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698