| OLD | NEW |
| 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_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/win/scoped_gdi_object.h" | 10 #include "base/win/scoped_gdi_object.h" |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 break; | 510 break; |
| 511 } | 511 } |
| 512 default: { | 512 default: { |
| 513 res = Play(context); | 513 res = Play(context); |
| 514 break; | 514 break; |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 return res; | 517 return res; |
| 518 } | 518 } |
| 519 | 519 |
| 520 SkDevice* Emf::StartPageForVectorCanvas( | 520 SkBaseDevice* Emf::StartPageForVectorCanvas( |
| 521 const gfx::Size& page_size, const gfx::Rect& content_area, | 521 const gfx::Size& page_size, const gfx::Rect& content_area, |
| 522 const float& scale_factor) { | 522 const float& scale_factor) { |
| 523 if (!StartPage(page_size, content_area, scale_factor)) | 523 if (!StartPage(page_size, content_area, scale_factor)) |
| 524 return NULL; | 524 return NULL; |
| 525 | 525 |
| 526 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(), | 526 return skia::VectorPlatformDeviceEmf::CreateDevice(page_size.width(), |
| 527 page_size.height(), | 527 page_size.height(), |
| 528 true, hdc_); | 528 true, hdc_); |
| 529 } | 529 } |
| 530 | 530 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 RECT rect = page_bounds.ToRECT(); | 669 RECT rect = page_bounds.ToRECT(); |
| 670 ::EnumEnhMetaFile(hdc, emf(), &RasterizeAlphaBlendProc, &bitmap_dc, &rect); | 670 ::EnumEnhMetaFile(hdc, emf(), &RasterizeAlphaBlendProc, &bitmap_dc, &rect); |
| 671 | 671 |
| 672 result->FinishDocument(); | 672 result->FinishDocument(); |
| 673 | 673 |
| 674 return result.release(); | 674 return result.release(); |
| 675 } | 675 } |
| 676 | 676 |
| 677 | 677 |
| 678 } // namespace printing | 678 } // namespace printing |
| OLD | NEW |