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

Unified Diff: ui/gfx/color_space.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.h ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_space.cc
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index c3a8975c51420b1c7c37c1c425c71da0ca277080..8bb9bddca8882614957505d47eceb70e18d15af9 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -12,11 +12,9 @@
namespace gfx {
-ColorSpace::ColorSpace()
- : primaries_(PrimaryID::UNSPECIFIED),
- transfer_(TransferID::UNSPECIFIED),
- matrix_(MatrixID::UNSPECIFIED),
- range_(RangeID::LIMITED) {}
+ColorSpace::ColorSpace() {
+ memset(custom_primary_matrix_, 0, sizeof(custom_primary_matrix_));
+}
ColorSpace::ColorSpace(PrimaryID primaries,
TransferID transfer,
@@ -26,6 +24,7 @@ ColorSpace::ColorSpace(PrimaryID primaries,
transfer_(transfer),
matrix_(matrix),
range_(range) {
+ memset(custom_primary_matrix_, 0, sizeof(custom_primary_matrix_));
// TODO: Set profile_id_
}
« no previous file with comments | « ui/gfx/color_space.h ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698