| Index: printing/image_win.cc
|
| diff --git a/printing/image_win.cc b/printing/image_win.cc
|
| index 787c24aa52716951b01484d1a3a054cd35e9f706..647374054568b6db8c5e439cb217b84f6c099e71 100644
|
| --- a/printing/image_win.cc
|
| +++ b/printing/image_win.cc
|
| @@ -11,7 +11,7 @@
|
| #include "base/win/scoped_gdi_object.h"
|
| #include "base/win/scoped_hdc.h"
|
| #include "base/win/scoped_select_object.h"
|
| -#include "printing/metafile.h"
|
| +#include "printing/emf_win.h"
|
| #include "skia/ext/skia_utils_win.h"
|
| #include "ui/gfx/gdi_util.h" // EMF support
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -53,8 +53,13 @@ class DisableFontSmoothing {
|
|
|
| namespace printing {
|
|
|
| -bool Image::LoadMetafile(const Metafile& metafile) {
|
| - gfx::Rect rect(metafile.GetPageBounds(1));
|
| +bool Image::LoadMetafile(const void* metafile_src_buffer,
|
| + size_t metafile_src_buffer_size) {
|
| + Emf metafile;
|
| + if (!metafile.InitFromData(metafile_src_buffer, metafile_src_buffer_size)) {
|
| + return false;
|
| + }
|
| + gfx::Rect rect(metafile.GetPageBounds(1));
|
| DisableFontSmoothing disable_in_this_scope;
|
|
|
| // Create a temporary HDC and bitmap to retrieve the rendered data.
|
|
|