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

Unified Diff: cc/output/shader.h

Issue 2645953007: cc: Add analytic color conversion to shaders (Closed)
Patch Set: Created 3 years, 11 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 | « cc/output/program_binding.h ('k') | cc/output/shader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader.h
diff --git a/cc/output/shader.h b/cc/output/shader.h
index 6be4c5d83848ff7429974bc54df8a1b405146dae..d060f7bfacdafc99f45f5e36bd148218130dfc59 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -132,6 +132,9 @@ enum YUVAlphaTextureMode {
enum ColorConversionMode {
// No color conversion is performed.
COLOR_CONVERSION_MODE_NONE,
+ // Conversion is done using analytic transfer functions as specified by
+ // SkColorSpaceTransferFn in a uniform array.
+ COLOR_CONVERSION_MODE_ANALYTIC,
// Conversion is done directly from YUV to output RGB space, via a 3D texture
// represented as a 2D texture.
COLOR_CONVERSION_MODE_LUT_FROM_YUV,
@@ -283,6 +286,9 @@ class FragmentShader {
UVTextureMode uv_texture_mode_ = UV_TEXTURE_MODE_UV;
ColorConversionMode color_conversion_mode_ = COLOR_CONVERSION_MODE_NONE;
+ int color_src_to_dst_primary_matrix_location_ = -1;
+ int color_src_to_linear_tr_fn_location_ = -1;
+ int color_linear_to_dst_tr_fn_location_ = -1;
// YUV uniform locations.
int y_texture_location_ = -1;
« no previous file with comments | « cc/output/program_binding.h ('k') | cc/output/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698