| 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 namespace { | 27 namespace { |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 metafile->data_->pages_.push_back(data_->pages_.back()); | 282 metafile->data_->pages_.push_back(data_->pages_.back()); |
| 283 | 283 |
| 284 if (!metafile->FinishDocument()) // Generate PDF. | 284 if (!metafile->FinishDocument()) // Generate PDF. |
| 285 metafile.reset(); | 285 metafile.reset(); |
| 286 | 286 |
| 287 return metafile; | 287 return metafile; |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace printing | 290 } // namespace printing |
| OLD | NEW |