| 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" |
| 11 #include "cc/base/cc_export.h" | |
| 12 | 11 |
| 13 namespace gfx { | 12 namespace gfx { |
| 14 class Point; | 13 class Point; |
| 15 class Size; | 14 class Size; |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace gpu { | 17 namespace gpu { |
| 19 namespace gles2 { | 18 namespace gles2 { |
| 20 class GLES2Interface; | 19 class GLES2Interface; |
| 21 } | 20 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 int tex_transform = -1; | 81 int tex_transform = -1; |
| 83 int backdrop = -1; | 82 int backdrop = -1; |
| 84 int backdrop_rect = -1; | 83 int backdrop_rect = -1; |
| 85 int original_backdrop = -1; | 84 int original_backdrop = -1; |
| 86 }; | 85 }; |
| 87 | 86 |
| 88 // Note: The highp_threshold_cache must be provided by the caller to make | 87 // Note: The highp_threshold_cache must be provided by the caller to make |
| 89 // the caching multi-thread/context safe in an easy low-overhead manner. | 88 // the caching multi-thread/context safe in an easy low-overhead manner. |
| 90 // The caller must make sure to clear highp_threshold_cache to 0, so it can be | 89 // The caller must make sure to clear highp_threshold_cache to 0, so it can be |
| 91 // reinitialized, if a new or different context is used. | 90 // reinitialized, if a new or different context is used. |
| 92 CC_EXPORT TexCoordPrecision | 91 TexCoordPrecision TexCoordPrecisionRequired(gpu::gles2::GLES2Interface* context, |
| 93 TexCoordPrecisionRequired(gpu::gles2::GLES2Interface* context, | 92 int* highp_threshold_cache, |
| 94 int* highp_threshold_cache, | 93 int highp_threshold_min, |
| 95 int highp_threshold_min, | 94 const gfx::Point& max_coordinate); |
| 96 const gfx::Point& max_coordinate); | |
| 97 | 95 |
| 98 CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( | 96 TexCoordPrecision TexCoordPrecisionRequired(gpu::gles2::GLES2Interface* context, |
| 99 gpu::gles2::GLES2Interface* context, | 97 int* highp_threshold_cache, |
| 100 int *highp_threshold_cache, | 98 int highp_threshold_min, |
| 101 int highp_threshold_min, | 99 const gfx::Size& max_size); |
| 102 const gfx::Size& max_size); | |
| 103 | 100 |
| 104 class VertexShaderPosTex { | 101 class VertexShaderPosTex { |
| 105 public: | 102 public: |
| 106 VertexShaderPosTex(); | 103 VertexShaderPosTex(); |
| 107 | 104 |
| 108 void Init(gpu::gles2::GLES2Interface* context, | 105 void Init(gpu::gles2::GLES2Interface* context, |
| 109 unsigned program, | 106 unsigned program, |
| 110 int* base_uniform_index); | 107 int* base_uniform_index); |
| 111 std::string GetShaderString() const; | 108 std::string GetShaderString() const; |
| 112 static std::string GetShaderHead(); | 109 static std::string GetShaderHead(); |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 int tex_transform_location_; | 878 int tex_transform_location_; |
| 882 int frequency_location_; | 879 int frequency_location_; |
| 883 int color_location_; | 880 int color_location_; |
| 884 | 881 |
| 885 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); | 882 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); |
| 886 }; | 883 }; |
| 887 | 884 |
| 888 } // namespace cc | 885 } // namespace cc |
| 889 | 886 |
| 890 #endif // CC_OUTPUT_SHADER_H_ | 887 #endif // CC_OUTPUT_SHADER_H_ |
| OLD | NEW |