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

Side by Side Diff: printing/pdf_metafile_skia.cc

Issue 2810363004: Revert of Back PaintRecord with PaintOpBuffer instead of SkPicture (Closed)
Patch Set: Created 3 years, 8 months 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
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/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"
15 #include "cc/paint/paint_record.h" 16 #include "cc/paint/paint_record.h"
16 #include "cc/paint/paint_recorder.h" 17 #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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 metafile->data_->pages_.push_back(data_->pages_.back()); 288 metafile->data_->pages_.push_back(data_->pages_.back());
289 289
290 if (!metafile->FinishDocument()) // Generate PDF. 290 if (!metafile->FinishDocument()) // Generate PDF.
291 metafile.reset(); 291 metafile.reset();
292 292
293 return metafile; 293 return metafile;
294 } 294 }
295 295
296 } // namespace printing 296 } // namespace printing
OLDNEW
« no previous file with comments | « cc/test/test_skcanvas.cc ('k') | third_party/WebKit/LayoutTests/fast/multicol/layers-in-multicol-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698