summaryrefslogtreecommitdiffstats
path: root/printing/pdf_ps_metafile_cairo.cc
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:35:22 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 16:35:22 +0000
commite6eddfdb8f1a9688145e5efba334d484c738a1c6 (patch)
treef7f527ea233ab64053683a7af7933314a93f1934 /printing/pdf_ps_metafile_cairo.cc
parent8effd3f691277e168a10890127085a3bc999810f (diff)
downloadchromium_src-e6eddfdb8f1a9688145e5efba334d484c738a1c6.zip
chromium_src-e6eddfdb8f1a9688145e5efba334d484c738a1c6.tar.gz
chromium_src-e6eddfdb8f1a9688145e5efba334d484c738a1c6.tar.bz2
Make PluginInstance::PrintPDFOutput metafile-implementation agnostic on Linux.
PluginInstance::PrintPDFOutput wants to set the PDF bits in the metafile. This change makes it agnostic to the implementation of NativeMetafile in use by using the SkRefDict in SkDevice (and removes the old mechanism). BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/6733036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/pdf_ps_metafile_cairo.cc')
-rw-r--r--printing/pdf_ps_metafile_cairo.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/printing/pdf_ps_metafile_cairo.cc b/printing/pdf_ps_metafile_cairo.cc
index fdbb335..a10b125 100644
--- a/printing/pdf_ps_metafile_cairo.cc
+++ b/printing/pdf_ps_metafile_cairo.cc
@@ -20,8 +20,6 @@
namespace {
-const cairo_user_data_key_t kPdfMetafileKey = {0};
-
// Tests if |surface| is valid.
bool IsSurfaceValid(cairo_surface_t* surface) {
return cairo_surface_status(surface) == CAIRO_STATUS_SUCCESS;
@@ -63,10 +61,6 @@ cairo_status_t WriteCairoStream(void* dst_buffer,
return CAIRO_STATUS_SUCCESS;
}
-void DestroyContextData(void* data) {
- // Nothing to be done here.
-}
-
} // namespace
namespace printing {
@@ -110,7 +104,6 @@ bool PdfPsMetafile::Init() {
return false;
}
- cairo_set_user_data(context_, &kPdfMetafileKey, this, DestroyContextData);
return true;
}
@@ -257,11 +250,6 @@ bool PdfPsMetafile::SaveToFD(const base::FileDescriptor& fd) const {
}
#endif // if defined(OS_CHROMEOS)
-PdfPsMetafile* PdfPsMetafile::FromCairoContext(cairo_t* context) {
- return reinterpret_cast<PdfPsMetafile*>(
- cairo_get_user_data(context, &kPdfMetafileKey));
-}
-
void PdfPsMetafile::CleanUpAll() {
CleanUpContext(&context_);
CleanUpSurface(&surface_);