OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "printing/image.h" | 5 #include "printing/image.h" |
6 | 6 |
7 #include "gfx/gdi_util.h" // EMF support | |
8 #include "gfx/rect.h" | |
9 #include "skia/ext/platform_device.h" | 7 #include "skia/ext/platform_device.h" |
| 8 #include "ui/gfx/gdi_util.h" // EMF support |
| 9 #include "ui/gfx/rect.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // A simple class which temporarily overrides system settings. | 13 // A simple class which temporarily overrides system settings. |
14 // The bitmap image rendered via the PlayEnhMetaFile() function depends on | 14 // The bitmap image rendered via the PlayEnhMetaFile() function depends on |
15 // some system settings. | 15 // some system settings. |
16 // As a workaround for such dependency, this class saves the system settings | 16 // As a workaround for such dependency, this class saves the system settings |
17 // and changes them. This class also restore the saved settings in its | 17 // and changes them. This class also restore the saved settings in its |
18 // destructor. | 18 // destructor. |
19 class DisableFontSmoothing { | 19 class DisableFontSmoothing { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 data_.resize(bytes); | 79 data_.resize(bytes); |
80 memcpy(&*data_.begin(), bits, bytes); | 80 memcpy(&*data_.begin(), bits, bytes); |
81 | 81 |
82 DeleteDC(hdc); | 82 DeleteDC(hdc); |
83 DeleteObject(bitmap); | 83 DeleteObject(bitmap); |
84 | 84 |
85 return success; | 85 return success; |
86 } | 86 } |
87 | 87 |
88 } // namespace printing | 88 } // namespace printing |
OLD | NEW |