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

Unified Diff: cc/output/color_lut_cache.cc

Issue 2747083006: Fix HDR LUTs (Closed)
Patch Set: Created 3 years, 9 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/color_lut_cache.cc
diff --git a/cc/output/color_lut_cache.cc b/cc/output/color_lut_cache.cc
index 4cc72203631722db13db39be9d8f392e618bd87f..1a796dbcf2f23602d6a7d642af80a7968e7ba4cc 100644
--- a/cc/output/color_lut_cache.cc
+++ b/cc/output/color_lut_cache.cc
@@ -103,11 +103,11 @@ ColorLUTCache::LUT ColorLUTCache::GetLUT(const gfx::ColorTransform* transform) {
}
LUT lut;
- // If input is HDR, and the output is scRGB, we're going to need
+ // If input is HDR, and the output is full range, we're going to need
// to produce values outside of 0-1, so we'll need to make a half-float
// LUT. Also, we'll need to build a larger lut to maintain accuracy.
- // All LUT sizes should be odd a some transforms hav a knee at 0.5.
- if (transform->GetDstColorSpace() == gfx::ColorSpace::CreateSCRGBLinear() &&
+ // All LUT sizes should be odd as some transforms have a knee at 0.5.
+ if (transform->GetDstColorSpace().FullRangeEncodedValues() &&
transform->GetSrcColorSpace().IsHDR() && texture_half_float_linear_) {
lut.size = 37;
lut.texture = MakeLUT<uint16_t>(transform, lut.size);
« no previous file with comments | « no previous file | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698