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

Unified Diff: ui/gfx/color_space.h

Issue 2148013002: Revert of Color: Don't duplicate ICC profile data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | ui/gfx/color_space.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.h
diff --git a/ui/gfx/color_space.h b/ui/gfx/color_space.h
index 44a85eb4a761a7d8457ef00635d0d01183430bd5..0129e7e1cb4282c8ac765a927293bf19455c0afd 100644
--- a/ui/gfx/color_space.h
+++ b/ui/gfx/color_space.h
@@ -8,7 +8,6 @@
#include <vector>
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "ui/gfx/gfx_export.h"
@@ -26,7 +25,6 @@
ColorSpace& operator=(const ColorSpace& other);
~ColorSpace();
bool operator==(const ColorSpace& other) const;
- bool operator<(const ColorSpace& other) const;
// Returns the color profile of the monitor that can best represent color.
// This profile should be used for creating content that does not know on
@@ -37,7 +35,7 @@
static ColorSpace FromCGColorSpace(CGColorSpaceRef cg_color_space);
#endif
- const std::vector<char>& GetICCProfile() const;
+ const std::vector<char>& GetICCProfile() const { return icc_profile_; }
#if defined(OS_WIN)
// This will read monitor ICC profiles from disk and cache the results for the
@@ -49,20 +47,7 @@
static bool IsValidProfileLength(size_t length);
private:
- struct Key;
- class GlobalData;
- friend struct Key;
- friend class GlobalData;
- enum class Type {
- UNDEFINED,
- ICC_PROFILE,
- };
- Type type_ = Type::UNDEFINED;
-
- // GlobalData stores large or expensive-to-compute data about a color space
- // (e.g, ICC profile). This structure is shared by all identical ColorSpace
- // objects in the process. It is lazily initialized for named color spaces.
- mutable scoped_refptr<GlobalData> global_data_;
+ std::vector<char> icc_profile_;
};
} // namespace gfx
« no previous file with comments | « no previous file | ui/gfx/color_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698