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

Unified Diff: printing/emf_win.h

Issue 2812263002: clean up printing::Image and printing::Metafile (Closed)
Patch Set: return Created 3 years, 8 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
Index: printing/emf_win.h
diff --git a/printing/emf_win.h b/printing/emf_win.h
index c66e9f24b989745c59ec07296e6ee67bc0a86826..7d976eb89b02a85ae8f6a3953ee79fe9f9659fcf 100644
--- a/printing/emf_win.h
+++ b/printing/emf_win.h
@@ -77,7 +77,17 @@ class PRINTING_EXPORT Emf : public Metafile {
unsigned int GetPageCount() const override;
HDC context() const override;
- bool Playback(HDC hdc, const RECT* rect) const override;
+
+ // "Plays" the EMF buffer in a HDC. It is the same effect as calling the
Lei Zhang 2017/04/12 19:33:33 nit: Can you move this down to keep all the overri
hal.canary 2017/04/13 20:55:38 Done.
+ // original GDI function that were called when recording the EMF. |rect| is in
+ // "logical units" and is optional. If |rect| is NULL, the natural EMF bounds
+ // are used.
+ // Note: Windows has been known to have stack buffer overflow in its GDI
+ // functions, whether used directly or indirectly through precompiled EMF
+ // data. We have to accept the risk here. Since it is used only for printing,
+ // it requires user intervention.
+ bool Playback(HDC hdc, const RECT* rect) const;
+
bool SafePlayback(HDC hdc) const override;
HENHMETAFILE emf() const { return emf_; }

Powered by Google App Engine
This is Rietveld 408576698