| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file is here so other GLES2 related files can have a common set of | 5 // This file is here so other GLES2 related files can have a common set of |
| 6 // includes where appropriate. | 6 // includes where appropriate. |
| 7 | 7 |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 | 9 |
| 10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 return true; | 1871 return true; |
| 1872 case CONTEXT_TYPE_OPENGLES2: | 1872 case CONTEXT_TYPE_OPENGLES2: |
| 1873 case CONTEXT_TYPE_OPENGLES3: | 1873 case CONTEXT_TYPE_OPENGLES3: |
| 1874 return false; | 1874 return false; |
| 1875 } | 1875 } |
| 1876 | 1876 |
| 1877 NOTREACHED(); | 1877 NOTREACHED(); |
| 1878 return false; | 1878 return false; |
| 1879 } | 1879 } |
| 1880 | 1880 |
| 1881 bool IsWebGL1OrES2ContextType(ContextType context_type) { |
| 1882 // Switch statement to cause a compile-time error if we miss a case. |
| 1883 switch (context_type) { |
| 1884 case CONTEXT_TYPE_WEBGL1: |
| 1885 case CONTEXT_TYPE_OPENGLES2: |
| 1886 return true; |
| 1887 case CONTEXT_TYPE_WEBGL2: |
| 1888 case CONTEXT_TYPE_OPENGLES3: |
| 1889 return false; |
| 1890 } |
| 1891 |
| 1892 NOTREACHED(); |
| 1893 return false; |
| 1894 } |
| 1895 |
| 1896 bool IsWebGL2OrES3ContextType(ContextType context_type) { |
| 1897 // Switch statement to cause a compile-time error if we miss a case. |
| 1898 switch (context_type) { |
| 1899 case CONTEXT_TYPE_OPENGLES3: |
| 1900 case CONTEXT_TYPE_WEBGL2: |
| 1901 return true; |
| 1902 case CONTEXT_TYPE_WEBGL1: |
| 1903 case CONTEXT_TYPE_OPENGLES2: |
| 1904 return false; |
| 1905 } |
| 1906 |
| 1907 NOTREACHED(); |
| 1908 return false; |
| 1909 } |
| 1910 |
| 1881 ContextCreationAttribHelper::ContextCreationAttribHelper() | 1911 ContextCreationAttribHelper::ContextCreationAttribHelper() |
| 1882 : gpu_preference(gl::PreferIntegratedGpu), | 1912 : gpu_preference(gl::PreferIntegratedGpu), |
| 1883 alpha_size(-1), | 1913 alpha_size(-1), |
| 1884 blue_size(-1), | 1914 blue_size(-1), |
| 1885 green_size(-1), | 1915 green_size(-1), |
| 1886 red_size(-1), | 1916 red_size(-1), |
| 1887 depth_size(-1), | 1917 depth_size(-1), |
| 1888 stencil_size(-1), | 1918 stencil_size(-1), |
| 1889 samples(-1), | 1919 samples(-1), |
| 1890 sample_buffers(-1), | 1920 sample_buffers(-1), |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 } | 1994 } |
| 1965 } | 1995 } |
| 1966 | 1996 |
| 1967 return true; | 1997 return true; |
| 1968 } | 1998 } |
| 1969 | 1999 |
| 1970 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" | 2000 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" |
| 1971 | 2001 |
| 1972 } // namespace gles2 | 2002 } // namespace gles2 |
| 1973 } // namespace gpu | 2003 } // namespace gpu |
| OLD | NEW |