| 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 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace cc { | 23 namespace cc { |
| 24 | 24 |
| 25 enum TexCoordPrecision { | 25 enum TexCoordPrecision { |
| 26 TexCoordPrecisionNA, | 26 TexCoordPrecisionNA, |
| 27 TexCoordPrecisionMedium, | 27 TexCoordPrecisionMedium, |
| 28 TexCoordPrecisionHigh, | 28 TexCoordPrecisionHigh, |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 // Note: The highp_threshold_cache must be provided by the caller to make |
| 32 // the caching multi-thread/context safe in an easy low-overhead manner. |
| 33 // The caller must make sure to clear highp_threshold_cache to 0, so it can be |
| 34 // reinitialized, if a new or different context is used. |
| 31 CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( | 35 CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( |
| 32 WebKit::WebGraphicsContext3D* context, | 36 WebKit::WebGraphicsContext3D* context, |
| 37 int *highp_threshold_cache, |
| 33 int highp_threshold_min, | 38 int highp_threshold_min, |
| 34 gfx::Point max_coordinate); | 39 gfx::Point max_coordinate); |
| 35 | 40 |
| 36 CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( | 41 CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( |
| 37 WebKit::WebGraphicsContext3D* context, | 42 WebKit::WebGraphicsContext3D* context, |
| 43 int *highp_threshold_cache, |
| 38 int highp_threshold_min, | 44 int highp_threshold_min, |
| 39 gfx::Size max_size); | 45 gfx::Size max_size); |
| 40 | 46 |
| 41 class VertexShaderPosTex { | 47 class VertexShaderPosTex { |
| 42 public: | 48 public: |
| 43 VertexShaderPosTex(); | 49 VertexShaderPosTex(); |
| 44 | 50 |
| 45 void Init(WebKit::WebGraphicsContext3D* context, | 51 void Init(WebKit::WebGraphicsContext3D* context, |
| 46 unsigned program, | 52 unsigned program, |
| 47 bool using_bind_uniform, | 53 bool using_bind_uniform, |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 int tex_transform_location_; | 611 int tex_transform_location_; |
| 606 int frequency_location_; | 612 int frequency_location_; |
| 607 int color_location_; | 613 int color_location_; |
| 608 | 614 |
| 609 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); | 615 DISALLOW_COPY_AND_ASSIGN(FragmentShaderCheckerboard); |
| 610 }; | 616 }; |
| 611 | 617 |
| 612 } // namespace cc | 618 } // namespace cc |
| 613 | 619 |
| 614 #endif // CC_OUTPUT_SHADER_H_ | 620 #endif // CC_OUTPUT_SHADER_H_ |
| OLD | NEW |