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

Side by Side Diff: printing/pdf_metafile_skia.h

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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/metafile_skia_wrapper.cc ('k') | printing/pdf_metafile_skia.cc » ('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 #ifndef PRINTING_PDF_METAFILE_SKIA_H_ 5 #ifndef PRINTING_PDF_METAFILE_SKIA_H_
6 #define PRINTING_PDF_METAFILE_SKIA_H_ 6 #define PRINTING_PDF_METAFILE_SKIA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "printing/metafile.h" 14 #include "printing/metafile.h"
15 #include "skia/ext/platform_canvas.h" 15 #include "skia/ext/platform_canvas.h"
16 16
17 #if defined(OS_WIN) 17 #if defined(OS_WIN)
18 #include <windows.h> 18 #include <windows.h>
19 #endif 19 #endif
20 20
21 class SkCanvas;
22
23 namespace printing { 21 namespace printing {
24 22
25 enum SkiaDocumentType { 23 enum SkiaDocumentType {
26 PDF_SKIA_DOCUMENT_TYPE, 24 PDF_SKIA_DOCUMENT_TYPE,
27 // MSKP is an experimental, fragile, and diagnostic-only document type. 25 // MSKP is an experimental, fragile, and diagnostic-only document type.
28 MSKP_SKIA_DOCUMENT_TYPE, 26 MSKP_SKIA_DOCUMENT_TYPE,
29 }; 27 };
30 28
31 struct PdfMetafileSkiaData; 29 struct PdfMetafileSkiaData;
32 30
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Return a new metafile containing just the current page in draft mode. 68 // Return a new metafile containing just the current page in draft mode.
71 std::unique_ptr<PdfMetafileSkia> GetMetafileForCurrentPage( 69 std::unique_ptr<PdfMetafileSkia> GetMetafileForCurrentPage(
72 SkiaDocumentType type); 70 SkiaDocumentType type);
73 71
74 // This method calls StartPage and then returns an appropriate 72 // This method calls StartPage and then returns an appropriate
75 // PlatformCanvas implementation bound to the context created by 73 // PlatformCanvas implementation bound to the context created by
76 // StartPage or NULL on error. The SkCanvas pointer that 74 // StartPage or NULL on error. The SkCanvas pointer that
77 // is returned is owned by this PdfMetafileSkia object and does not 75 // is returned is owned by this PdfMetafileSkia object and does not
78 // need to be ref()ed or unref()ed. The canvas will remain valid 76 // need to be ref()ed or unref()ed. The canvas will remain valid
79 // until FinishPage() or FinishDocument() is called. 77 // until FinishPage() or FinishDocument() is called.
80 SkCanvas* GetVectorCanvasForNewPage(const gfx::Size& page_size, 78 CdlCanvas* GetVectorCanvasForNewPage(const gfx::Size& page_size,
81 const gfx::Rect& content_area, 79 const gfx::Rect& content_area,
82 const float& scale_factor); 80 const float& scale_factor);
83 81
84 private: 82 private:
85 std::unique_ptr<PdfMetafileSkiaData> data_; 83 std::unique_ptr<PdfMetafileSkiaData> data_;
86 84
87 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia); 85 DISALLOW_COPY_AND_ASSIGN(PdfMetafileSkia);
88 }; 86 };
89 87
90 } // namespace printing 88 } // namespace printing
91 89
92 #endif // PRINTING_PDF_METAFILE_SKIA_H_ 90 #endif // PRINTING_PDF_METAFILE_SKIA_H_
OLDNEW
« no previous file with comments | « printing/metafile_skia_wrapper.cc ('k') | printing/pdf_metafile_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698