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

Unified Diff: cc/output/program_binding.h

Issue 2677893003: cc: Add color conversion support to all DrawQuad types (Closed)
Patch Set: Update w/2681223002 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
Index: cc/output/program_binding.h
diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
index b79a0c293085f39c9bff0bc7d419760826d344ea..3b9a382b28a8ae5296d409bc7ebf0870fd50aa92 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -66,6 +66,7 @@ enum ProgramType {
class CC_EXPORT ProgramKey {
public:
+ ProgramKey();
ProgramKey(const ProgramKey& other);
~ProgramKey();
@@ -93,13 +94,16 @@ class CC_EXPORT ProgramKey {
static ProgramKey YUVVideo(TexCoordPrecision precision,
SamplerType sampler,
YUVAlphaTextureMode yuv_alpha_texture_mode,
- UVTextureMode uv_texture_mode,
- ColorConversionMode color_conversion_mode);
+ UVTextureMode uv_texture_mode);
bool operator==(const ProgramKey& other) const;
+ bool operator!=(const ProgramKey& other) const;
+
+ void SetColorConversionMode(ColorConversionMode color_conversion_mode) {
+ color_conversion_mode_ = color_conversion_mode;
+ }
private:
- ProgramKey();
friend struct ProgramKeyHash;
friend class Program;
@@ -159,6 +163,7 @@ class Program : public ProgramBindingBase {
fragment_shader_.premultiply_alpha_mode_ = key.premultiplied_alpha_;
fragment_shader_.mask_mode_ = key.mask_mode_;
fragment_shader_.mask_for_background_ = key.mask_for_background_;
+ fragment_shader_.color_conversion_mode_ = key.color_conversion_mode_;
switch (key.type_) {
case PROGRAM_TYPE_DEBUG_BORDER:
@@ -382,7 +387,6 @@ class Program : public ProgramBindingBase {
fragment_shader_.has_uniform_alpha_ = true;
fragment_shader_.yuv_alpha_texture_mode_ = key.yuv_alpha_texture_mode_;
fragment_shader_.uv_texture_mode_ = key.uv_texture_mode_;
- fragment_shader_.color_conversion_mode_ = key.color_conversion_mode_;
}
void InitializeInternal(ContextProvider* context_provider) {

Powered by Google App Engine
This is Rietveld 408576698