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

Unified Diff: printing/image.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/image.h
diff --git a/printing/image.h b/printing/image.h
index e055d189587aaba2d05fe458b56b46c64fe25389..7bb3cd78c6683a0f33590334a38a9ce8a4e046d7 100644
--- a/printing/image.h
+++ b/printing/image.h
@@ -21,15 +21,13 @@ class FilePath;
namespace printing {
-class Metafile;
-
// Lightweight raw-bitmap management. The image, once initialized, is immutable.
// The main purpose is testing image contents.
class PRINTING_EXPORT Image {
public:
// Creates the image from the metafile. Deduces bounds based on bounds in
// metafile. If loading fails size().IsEmpty() will be true.
- explicit Image(const Metafile& metafile);
+ Image(const void* metafile_src_buffer, size_t metafile_src_buffer_size);
// Copy constructor.
explicit Image(const Image& image);
@@ -66,13 +64,10 @@ class PRINTING_EXPORT Image {
}
private:
- // Construct from metafile. This is kept internal since it's ambiguous what
- // kind of data is used (png, bmp, metafile etc).
- Image(const void* data, size_t size);
-
bool LoadPng(const std::string& compressed);
Lei Zhang 2017/04/12 19:33:33 This is dead code, BTW.
hal.canary 2017/04/13 20:55:38 I'll clean up some of this dead code....and I just
Lei Zhang 2017/04/13 21:21:20 There's certainly a lot of cruft here.
- bool LoadMetafile(const Metafile& metafile);
+ bool LoadMetafile(const void* metafile_src_buffer,
+ size_t metafile_src_buffer_size);
// Pixel dimensions of the image.
gfx::Size size_;
« printing/emf_win.h ('K') | « printing/emf_win.h ('k') | printing/image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698