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

Side by Side Diff: chrome/browser/printing/print_view_manager.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/printing/print_view_manager.h" 5 #include "chrome/browser/printing/print_view_manager.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 metafile->RasterizeMetafile(raster_size)); 267 metafile->RasterizeMetafile(raster_size));
268 if (raster_metafile.get()) { 268 if (raster_metafile.get()) {
269 metafile.swap(raster_metafile); 269 metafile.swap(raster_metafile);
270 } else if (big_emf) { 270 } else if (big_emf) {
271 // Don't fall back to emf here. 271 // Don't fall back to emf here.
272 NOTREACHED() << "size:" << params.data_size; 272 NOTREACHED() << "size:" << params.data_size;
273 TerminatePrintJob(true); 273 TerminatePrintJob(true);
274 web_contents()->Stop(); 274 web_contents()->Stop();
275 return; 275 return;
276 } 276 }
277 } else if (!print_job_->settings().supports_alpha_blend() &&
278 metafile->IsAlphaBlendUsed()) {
279 scoped_ptr<NativeMetafile> raster_metafile(
280 metafile->RasterizeAlphaBlend());
281 if (raster_metafile.get())
282 metafile.swap(raster_metafile);
283 } 277 }
284
285 #endif 278 #endif
286 279
287 // Update the rendered document. It will send notifications to the listener. 280 // Update the rendered document. It will send notifications to the listener.
288 document->SetPage(params.page_number, 281 document->SetPage(params.page_number,
289 metafile.release(), 282 metafile.release(),
290 params.actual_shrink, 283 params.actual_shrink,
291 params.page_size, 284 params.page_size,
292 params.content_area); 285 params.content_area);
293 286
294 ShouldQuitFromInnerMessageLoop(); 287 ShouldQuitFromInnerMessageLoop();
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 scoped_refptr<printing::PrinterQuery> printer_query; 677 scoped_refptr<printing::PrinterQuery> printer_query;
685 print_job_manager->PopPrinterQuery(cookie, &printer_query); 678 print_job_manager->PopPrinterQuery(cookie, &printer_query);
686 if (!printer_query.get()) 679 if (!printer_query.get())
687 return; 680 return;
688 BrowserThread::PostTask( 681 BrowserThread::PostTask(
689 BrowserThread::IO, FROM_HERE, 682 BrowserThread::IO, FROM_HERE,
690 base::Bind(&PrinterQuery::StopWorker, printer_query.get())); 683 base::Bind(&PrinterQuery::StopWorker, printer_query.get()));
691 } 684 }
692 685
693 } // namespace printing 686 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698