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

Side by Side Diff: printing/emf_win.cc

Issue 697373004: Moved StartPageForVectorCanvas from Metafile to PdfMetafileSkia. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tue Nov 4 10:41:42 PST 2014 Created 6 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
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('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 "printing/emf_win.h" 5 #include "printing/emf_win.h"
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 res = true; 442 res = true;
443 break; 443 break;
444 default: { 444 default: {
445 res = Play(context); 445 res = Play(context);
446 break; 446 break;
447 } 447 }
448 } 448 }
449 return res; 449 return res;
450 } 450 }
451 451
452 SkBaseDevice* Emf::StartPageForVectorCanvas(
453 const gfx::Size& page_size, const gfx::Rect& content_area,
454 const float& scale_factor) {
455 if (!StartPage(page_size, content_area, scale_factor))
456 return NULL;
457
458 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(),
459 page_size.height(),
460 true, hdc_);
461 }
462
463 bool Emf::StartPage(const gfx::Size& /*page_size*/, 452 bool Emf::StartPage(const gfx::Size& /*page_size*/,
464 const gfx::Rect& /*content_area*/, 453 const gfx::Rect& /*content_area*/,
465 const float& /*scale_factor*/) { 454 const float& /*scale_factor*/) {
466 return true; 455 return true;
467 } 456 }
468 457
469 bool Emf::FinishPage() { 458 bool Emf::FinishPage() {
470 return true; 459 return true;
471 } 460 }
472 461
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 RECT rect = page_bounds.ToRECT(); 579 RECT rect = page_bounds.ToRECT();
591 ::EnumEnhMetaFile(hdc, emf(), &RasterizeAlphaBlendProc, &bitmap_dc, &rect); 580 ::EnumEnhMetaFile(hdc, emf(), &RasterizeAlphaBlendProc, &bitmap_dc, &rect);
592 581
593 result->FinishDocument(); 582 result->FinishDocument();
594 583
595 return result.Pass(); 584 return result.Pass();
596 } 585 }
597 586
598 587
599 } // namespace printing 588 } // namespace printing
OLDNEW
« no previous file with comments | « printing/emf_win.h ('k') | printing/metafile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698