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

Unified Diff: printing/pdf_metafile_skia.cc

Issue 7633040: CL removing inheritance of SkDevice from PlatformDevice. Flavours of PlatformDevice classes now ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « no previous file | skia/ext/bitmap_platform_device_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/pdf_metafile_skia.cc
===================================================================
--- printing/pdf_metafile_skia.cc (revision 98225)
+++ printing/pdf_metafile_skia.cc (working copy)
@@ -61,17 +61,14 @@
transform.preScale(SkFloatToScalar(scale_factor),
SkFloatToScalar(scale_factor));
- // TODO(ctguil): Refactor: don't create the PDF device explicitly here.
SkISize pdf_page_size = SkISize::Make(page_size.width(), page_size.height());
SkISize pdf_content_size =
SkISize::Make(content_area.width(), content_area.height());
SkRefPtr<SkPDFDevice> pdf_device =
- new SkPDFDevice(pdf_page_size, pdf_content_size, transform);
- pdf_device->unref(); // SkRefPtr and new both took a reference.
- skia::VectorPlatformDeviceSkia* device =
- new skia::VectorPlatformDeviceSkia(pdf_device.get());
- data_->current_page_ = device->PdfDevice();
- return device;
+ new skia::VectorPlatformDeviceSkia(pdf_page_size, pdf_content_size,
+ transform);
+ data_->current_page_ = pdf_device;
+ return pdf_device.get();
}
bool PdfMetafileSkia::StartPage(const gfx::Size& page_size,
« no previous file with comments | « no previous file | skia/ext/bitmap_platform_device_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698