summaryrefslogtreecommitdiffstats
path: root/printing/emf_win.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 20:11:24 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 20:11:24 +0000
commite8980a56e8dcc4657cd1304665c0c03ff44d20c2 (patch)
treed1c65e184609602981383b17ebaef868c99b499b /printing/emf_win.cc
parent368ddad78d3f2eac1ea7a92cfb9716ecd0166279 (diff)
downloadchromium_src-e8980a56e8dcc4657cd1304665c0c03ff44d20c2.zip
chromium_src-e8980a56e8dcc4657cd1304665c0c03ff44d20c2.tar.gz
chromium_src-e8980a56e8dcc4657cd1304665c0c03ff44d20c2.tar.bz2
Printing: Standardize on Metafile::Init, removing Emf::CreateFromData in the
process and any ifdefs needed for this. BUG=none TEST=none Review URL: http://codereview.chromium.org/3595016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/emf_win.cc')
-rw-r--r--printing/emf_win.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index de3b7db..b7c6198 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -54,6 +54,14 @@ Emf::~Emf() {
DCHECK(!emf_ && !hdc_);
}
+bool Emf::Init(const void* src_buffer, uint32 src_buffer_size) {
+ DCHECK(!emf_ && !hdc_);
+ emf_ = SetEnhMetaFileBits(src_buffer_size,
+ reinterpret_cast<const BYTE*>(src_buffer));
+ DCHECK(emf_);
+ return emf_ != NULL;
+}
+
bool Emf::CreateDc(HDC sibling, const RECT* rect) {
DCHECK(!emf_ && !hdc_);
hdc_ = CreateEnhMetaFile(sibling, NULL, rect, NULL);
@@ -70,14 +78,6 @@ bool Emf::CreateFileBackedDc(HDC sibling, const RECT* rect,
return hdc_ != NULL;
}
-
-bool Emf::CreateFromData(const void* buffer, uint32 size) {
- DCHECK(!emf_ && !hdc_);
- emf_ = SetEnhMetaFileBits(size, reinterpret_cast<const BYTE*>(buffer));
- DCHECK(emf_);
- return emf_ != NULL;
-}
-
bool Emf::CreateFromFile(const FilePath& metafile_path) {
DCHECK(!emf_ && !hdc_);
emf_ = GetEnhMetaFile(metafile_path.value().c_str());