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/pdf_metafile_skia.h" | 5 #include "printing/pdf_metafile_skia.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "cc/paint/paint_canvas.h" | |
16 #include "cc/paint/paint_record.h" | 15 #include "cc/paint/paint_record.h" |
17 #include "cc/paint/paint_recorder.h" | 16 #include "cc/paint/paint_recorder.h" |
| 17 #include "cc/paint/skia_paint_canvas.h" |
18 #include "printing/print_settings.h" | 18 #include "printing/print_settings.h" |
19 #include "third_party/skia/include/core/SkDocument.h" | 19 #include "third_party/skia/include/core/SkDocument.h" |
20 #include "third_party/skia/include/core/SkStream.h" | 20 #include "third_party/skia/include/core/SkStream.h" |
21 // Note that headers in third_party/skia/src are fragile. This is | 21 // Note that headers in third_party/skia/src are fragile. This is |
22 // an experimental, fragile, and diagnostic-only document type. | 22 // an experimental, fragile, and diagnostic-only document type. |
23 #include "third_party/skia/src/utils/SkMultiPictureDocument.h" | 23 #include "third_party/skia/src/utils/SkMultiPictureDocument.h" |
24 #include "ui/gfx/geometry/safe_integer_conversions.h" | 24 #include "ui/gfx/geometry/safe_integer_conversions.h" |
25 #include "ui/gfx/skia_util.h" | 25 #include "ui/gfx/skia_util.h" |
26 | 26 |
27 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 323 |
324 metafile->data_->pages_.push_back(data_->pages_.back()); | 324 metafile->data_->pages_.push_back(data_->pages_.back()); |
325 | 325 |
326 if (!metafile->FinishDocument()) // Generate PDF. | 326 if (!metafile->FinishDocument()) // Generate PDF. |
327 metafile.reset(); | 327 metafile.reset(); |
328 | 328 |
329 return metafile; | 329 return metafile; |
330 } | 330 } |
331 | 331 |
332 } // namespace printing | 332 } // namespace printing |
OLD | NEW |