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

Unified Diff: printing/metafile_skia_wrapper.cc

Issue 641923002: Change PDF scaling factor from double to float. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/metafile_skia_wrapper.h ('k') | printing/printed_document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/metafile_skia_wrapper.cc
diff --git a/printing/metafile_skia_wrapper.cc b/printing/metafile_skia_wrapper.cc
index 3657bc12414b6972e07d571f6e699345510fce64..90a9c7c72cf138c91968657ce07017a14222c22c 100644
--- a/printing/metafile_skia_wrapper.cc
+++ b/printing/metafile_skia_wrapper.cc
@@ -14,7 +14,6 @@ namespace printing {
namespace {
const char* kMetafileKey = "CrMetafile";
-const char* kCustomScaleKey = "CrCustomScale";
} // namespace
@@ -40,25 +39,6 @@ PdfMetafileSkia* MetafileSkiaWrapper::GetMetafileFromCanvas(
return static_cast<MetafileSkiaWrapper*>(value)->metafile_;
}
-// static
-void MetafileSkiaWrapper::SetCustomScaleOnCanvas(const SkCanvas& canvas,
- double scale) {
- SkMetaData& meta = skia::getMetaData(canvas);
- meta.setScalar(kCustomScaleKey, SkFloatToScalar(scale));
-}
-
-// static
-bool MetafileSkiaWrapper::GetCustomScaleOnCanvas(const SkCanvas& canvas,
- double* scale) {
- SkMetaData& meta = skia::getMetaData(canvas);
- SkScalar value;
- if (!meta.findScalar(kCustomScaleKey, &value))
- return false;
-
- *scale = SkScalarToFloat(value);
- return true;
-}
-
MetafileSkiaWrapper::MetafileSkiaWrapper(PdfMetafileSkia* metafile)
: metafile_(metafile) {
}
« no previous file with comments | « printing/metafile_skia_wrapper.h ('k') | printing/printed_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698