| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_OUTPUT_SHADER_H_ | 5 #ifndef CC_OUTPUT_SHADER_H_ |
| 6 #define CC_OUTPUT_SHADER_H_ | 6 #define CC_OUTPUT_SHADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 enum SamplerType { | 80 enum SamplerType { |
| 81 SAMPLER_TYPE_NA = 0, | 81 SAMPLER_TYPE_NA = 0, |
| 82 SAMPLER_TYPE_2D = 1, | 82 SAMPLER_TYPE_2D = 1, |
| 83 SAMPLER_TYPE_2D_RECT = 2, | 83 SAMPLER_TYPE_2D_RECT = 2, |
| 84 SAMPLER_TYPE_EXTERNAL_OES = 3, | 84 SAMPLER_TYPE_EXTERNAL_OES = 3, |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 enum BlendMode { | 87 enum BlendMode { |
| 88 BLEND_MODE_NONE, | 88 BLEND_MODE_NONE, |
| 89 BLEND_MODE_NORMAL, | 89 BLEND_MODE_NORMAL, |
| 90 BLEND_MODE_DESTINATION_IN, |
| 90 BLEND_MODE_SCREEN, | 91 BLEND_MODE_SCREEN, |
| 91 BLEND_MODE_OVERLAY, | 92 BLEND_MODE_OVERLAY, |
| 92 BLEND_MODE_DARKEN, | 93 BLEND_MODE_DARKEN, |
| 93 BLEND_MODE_LIGHTEN, | 94 BLEND_MODE_LIGHTEN, |
| 94 BLEND_MODE_COLOR_DODGE, | 95 BLEND_MODE_COLOR_DODGE, |
| 95 BLEND_MODE_COLOR_BURN, | 96 BLEND_MODE_COLOR_BURN, |
| 96 BLEND_MODE_HARD_LIGHT, | 97 BLEND_MODE_HARD_LIGHT, |
| 97 BLEND_MODE_SOFT_LIGHT, | 98 BLEND_MODE_SOFT_LIGHT, |
| 98 BLEND_MODE_DIFFERENCE, | 99 BLEND_MODE_DIFFERENCE, |
| 99 BLEND_MODE_EXCLUSION, | 100 BLEND_MODE_EXCLUSION, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 int lut_texture_location_ = -1; | 302 int lut_texture_location_ = -1; |
| 302 int lut_size_location_ = -1; | 303 int lut_size_location_ = -1; |
| 303 int resource_multiplier_location_ = -1; | 304 int resource_multiplier_location_ = -1; |
| 304 int resource_offset_location_ = -1; | 305 int resource_offset_location_ = -1; |
| 305 | 306 |
| 306 private: | 307 private: |
| 307 friend class Program; | 308 friend class Program; |
| 308 | 309 |
| 309 std::string GetHelperFunctions() const; | 310 std::string GetHelperFunctions() const; |
| 310 std::string GetBlendFunction() const; | 311 std::string GetBlendFunction() const; |
| 312 std::string GetBlendFunctionBodyForAlpha() const; |
| 311 std::string GetBlendFunctionBodyForRGB() const; | 313 std::string GetBlendFunctionBodyForRGB() const; |
| 312 | 314 |
| 313 DISALLOW_COPY_AND_ASSIGN(FragmentShader); | 315 DISALLOW_COPY_AND_ASSIGN(FragmentShader); |
| 314 }; | 316 }; |
| 315 | 317 |
| 316 } // namespace cc | 318 } // namespace cc |
| 317 | 319 |
| 318 #endif // CC_OUTPUT_SHADER_H_ | 320 #endif // CC_OUTPUT_SHADER_H_ |
| OLD | NEW |