Index: printing/pdf_metafile_skia.cc |
diff --git a/printing/pdf_metafile_skia.cc b/printing/pdf_metafile_skia.cc |
index 752a8e2eea3e417a85424423c3930e53313692fe..51a6797680dc55186db1047f0d3a636bcab26de3 100644 |
--- a/printing/pdf_metafile_skia.cc |
+++ b/printing/pdf_metafile_skia.cc |
@@ -24,14 +24,6 @@ |
#include "ui/gfx/geometry/safe_integer_conversions.h" |
#include "ui/gfx/skia_util.h" |
-#if defined(OS_MACOSX) |
-#include "printing/pdf_metafile_cg_mac.h" |
-#endif |
- |
-#if defined(OS_POSIX) |
-#include "base/file_descriptor_posix.h" |
-#endif |
- |
namespace { |
bool WriteAssetToBuffer(const SkStreamAsset* asset, |
@@ -104,10 +96,6 @@ struct PdfMetafileSkiaData { |
float scale_factor_; |
SkSize size_; |
SkiaDocumentType type_; |
- |
-#if defined(OS_MACOSX) |
- PdfMetafileCg pdf_cg_; |
-#endif |
}; |
PdfMetafileSkia::~PdfMetafileSkia() {} |
@@ -255,30 +243,6 @@ bool PdfMetafileSkia::SafePlayback(skia::NativeDrawingContext hdc) const { |
NOTREACHED(); |
return false; |
} |
- |
-#elif defined(OS_MACOSX) |
-/* TODO(caryclark): The set up of PluginInstance::PrintPDFOutput may result in |
- rasterized output. Even if that flow uses PdfMetafileCg::RenderPage, |
- the drawing of the PDF into the canvas may result in a rasterized output. |
- PDFMetafileSkia::RenderPage should be not implemented as shown and instead |
- should do something like the following CL in PluginInstance::PrintPDFOutput: |
-http://codereview.chromium.org/7200040/diff/1/webkit/plugins/ppapi/ppapi_plugin_instance.cc |
-*/ |
-bool PdfMetafileSkia::RenderPage(unsigned int page_number, |
- CGContextRef context, |
- const CGRect rect, |
- const MacRenderPageParams& params) const { |
- DCHECK_GT(GetDataSize(), 0U); |
- if (data_->pdf_cg_.GetDataSize() == 0) { |
- if (GetDataSize() == 0) |
- return false; |
- size_t length = data_->pdf_data_->getLength(); |
- std::vector<uint8_t> buffer(length); |
- (void)WriteAssetToBuffer(data_->pdf_data_.get(), &buffer[0], length); |
- data_->pdf_cg_.InitFromData(&buffer[0], length); |
- } |
- return data_->pdf_cg_.RenderPage(page_number, context, rect, params); |
-} |
#endif |
bool PdfMetafileSkia::SaveTo(base::File* file) const { |