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

Unified Diff: cc/output/shader.h

Issue 2697253002: color: Add support for shader generation (Closed)
Patch Set: More bits of precision Created 3 years, 10 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.cc ('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 0d3899afbc9addc5a228f04e33c32d4823a1fde9..0f65a59538cdd7a3129570c8a559e962f81e7c47 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -12,6 +12,7 @@
#include "cc/base/cc_export.h"
namespace gfx {
+class ColorTransform;
class Point;
class Size;
}
@@ -137,6 +138,8 @@ enum ColorConversionMode {
// applicable) to output RGB space, via a 3D texture represented as a 2D
// texture.
COLOR_CONVERSION_MODE_LUT,
+ // Conversion is done analytically in the shader.
+ COLOR_CONVERSION_MODE_SHADER,
};
// TODO(ccameron): Merge this with BlendMode.
@@ -285,6 +288,7 @@ class FragmentShader {
UVTextureMode uv_texture_mode_ = UV_TEXTURE_MODE_UV;
ColorConversionMode color_conversion_mode_ = COLOR_CONVERSION_MODE_NONE;
+ const gfx::ColorTransform* color_transform_ = nullptr;
// YUV uniform locations.
int y_texture_location_ = -1;
@@ -295,10 +299,9 @@ class FragmentShader {
int ya_clamp_rect_location_ = -1;
int uv_clamp_rect_location_ = -1;
- // This matrix will convert from the values read in the YUV texture to
- // RGB (including resource offset and scale). If we are using LUT based
- // color conversion, then this will only perform resource offset and scale.
- int yuv_and_resource_matrix_location_ = -1;
+ // The resource offset and multiplier to adjust for bit depth.
+ int resource_multiplier_location_ = -1;
+ int resource_offset_location_ = -1;
// LUT YUV to color-converted RGB.
int lut_texture_location_ = -1;
« no previous file with comments | « cc/output/program_binding.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698