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

Unified Diff: ui/gfx/icc_profile.cc

Issue 2337423002: color: Initialize all members of gfx::ColorSpace (Closed)
Patch Set: don't convert invalid iccs Created 4 years, 3 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 | « ui/gfx/color_space.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icc_profile.cc
diff --git a/ui/gfx/icc_profile.cc b/ui/gfx/icc_profile.cc
index b1cd8d1150978308463c6ff5947e30a5ad9c055a..118a071124a06c7c064c1f5f20bf596429affda3 100644
--- a/ui/gfx/icc_profile.cc
+++ b/ui/gfx/icc_profile.cc
@@ -105,6 +105,9 @@ const std::vector<char>& ICCProfile::GetData() const {
}
ColorSpace ICCProfile::GetColorSpace() const {
+ if (!valid_)
+ return gfx::ColorSpace();
+
ColorSpace color_space(ColorSpace::PrimaryID::CUSTOM,
ColorSpace::TransferID::CUSTOM,
ColorSpace::MatrixID::RGB, ColorSpace::RangeID::FULL);
« no previous file with comments | « ui/gfx/color_space.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698