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/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 void set_blend_mode(BlendMode blend_mode) { blend_mode_ = blend_mode; } | 364 void set_blend_mode(BlendMode blend_mode) { blend_mode_ = blend_mode; } |
365 bool has_blend_mode() const { return blend_mode_ != BLEND_MODE_NONE; } | 365 bool has_blend_mode() const { return blend_mode_ != BLEND_MODE_NONE; } |
366 void set_mask_for_background(bool mask_for_background) { | 366 void set_mask_for_background(bool mask_for_background) { |
367 mask_for_background_ = mask_for_background; | 367 mask_for_background_ = mask_for_background; |
368 } | 368 } |
369 bool mask_for_background() const { return mask_for_background_; } | 369 bool mask_for_background() const { return mask_for_background_; } |
370 | 370 |
371 protected: | 371 protected: |
372 FragmentTexBlendMode(); | 372 FragmentTexBlendMode(); |
373 | 373 |
374 std::string SetBlendModeFunctions(std::string shader_string) const; | 374 std::string SetBlendModeFunctions(const std::string& shader_string) const; |
375 | 375 |
376 int backdrop_location_; | 376 int backdrop_location_; |
377 int original_backdrop_location_; | 377 int original_backdrop_location_; |
378 int backdrop_rect_location_; | 378 int backdrop_rect_location_; |
379 | 379 |
380 private: | 380 private: |
381 BlendMode blend_mode_; | 381 BlendMode blend_mode_; |
382 bool mask_for_background_; | 382 bool mask_for_background_; |
383 | 383 |
384 std::string GetHelperFunctions() const; | 384 std::string GetHelperFunctions() const; |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 | 864 |
865 private: | 865 private: |
866 int color_location_; | 866 int color_location_; |
867 | 867 |
868 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); | 868 DISALLOW_COPY_AND_ASSIGN(FragmentShaderColorAA); |
869 }; | 869 }; |
870 | 870 |
871 } // namespace cc | 871 } // namespace cc |
872 | 872 |
873 #endif // CC_OUTPUT_SHADER_H_ | 873 #endif // CC_OUTPUT_SHADER_H_ |
OLD | NEW |