Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: gpu/command_buffer/service/shader_translator.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "gpu/command_buffer/service/shader_translator.h" 5 #include "gpu/command_buffer/service/shader_translator.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string.h> 9 #include <string.h>
10 #include <algorithm> 10 #include <algorithm>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 iter != angle_map->end(); ++iter) { 103 iter != angle_map->end(); ++iter) {
104 // Note that in ANGLE, the map is (original_name, hash); 104 // Note that in ANGLE, the map is (original_name, hash);
105 // here, we want (hash, original_name). 105 // here, we want (hash, original_name).
106 (*name_map)[iter->second] = iter->first; 106 (*name_map)[iter->second] = iter->first;
107 } 107 }
108 } 108 }
109 109
110 } // namespace 110 } // namespace
111 111
112 ShShaderOutput ShaderTranslator::GetShaderOutputLanguageForContext( 112 ShShaderOutput ShaderTranslator::GetShaderOutputLanguageForContext(
113 const gfx::GLVersionInfo& version_info) { 113 const gl::GLVersionInfo& version_info) {
114 if (version_info.is_es) { 114 if (version_info.is_es) {
115 return SH_ESSL_OUTPUT; 115 return SH_ESSL_OUTPUT;
116 } 116 }
117 117
118 // Determine the GLSL version based on OpenGL specification. 118 // Determine the GLSL version based on OpenGL specification.
119 119
120 unsigned context_version = 120 unsigned context_version =
121 version_info.major_version * 100 + version_info.minor_version * 10; 121 version_info.major_version * 100 + version_info.minor_version * 10;
122 if (context_version >= 450) { 122 if (context_version >= 450) {
123 // OpenGL specs from 4.2 on specify that the core profile is "also 123 // OpenGL specs from 4.2 on specify that the core profile is "also
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 destruction_observers_, 276 destruction_observers_,
277 OnDestruct(this)); 277 OnDestruct(this));
278 278
279 if (compiler_ != NULL) 279 if (compiler_ != NULL)
280 ShDestruct(compiler_); 280 ShDestruct(compiler_);
281 } 281 }
282 282
283 } // namespace gles2 283 } // namespace gles2
284 } // namespace gpu 284 } // namespace gpu
285 285
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/command_buffer/service/shader_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698