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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 12210057: Added temporary #ifdefs to support incompatible ANGLE API upgrade. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed SH_VERSION macro due to conflict on Android bot. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/shader_translator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 break; 1790 break;
1791 case GL_VERTEX_SHADER: 1791 case GL_VERTEX_SHADER:
1792 compiler = vertex_compiler_; 1792 compiler = vertex_compiler_;
1793 break; 1793 break;
1794 } 1794 }
1795 if (!compiler) 1795 if (!compiler)
1796 return false; 1796 return false;
1797 1797
1798 char* source = entry->source.get(); 1798 char* source = entry->source.get();
1799 if (!ShCompile(compiler, &source, 1, SH_OBJECT_CODE)) { 1799 if (!ShCompile(compiler, &source, 1, SH_OBJECT_CODE)) {
1800 #if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
1800 int logSize = 0; 1801 int logSize = 0;
1802 #else
1803 size_t logSize = 0;
1804 #endif
1801 ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize); 1805 ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize);
1802 if (logSize > 1) { 1806 if (logSize > 1) {
1803 entry->log.reset(new char[logSize]); 1807 entry->log.reset(new char[logSize]);
1804 ShGetInfoLog(compiler, entry->log.get()); 1808 ShGetInfoLog(compiler, entry->log.get());
1805 } 1809 }
1806 return false; 1810 return false;
1807 } 1811 }
1808 1812
1813 #if !defined(ANGLE_SH_VERSION) || ANGLE_SH_VERSION < 108
1809 int length = 0; 1814 int length = 0;
1815 #else
1816 size_t length = 0;
1817 #endif
1810 ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &length); 1818 ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &length);
1811 if (length > 1) { 1819 if (length > 1) {
1812 entry->translated_source.reset(new char[length]); 1820 entry->translated_source.reset(new char[length]);
1813 ShGetObjectCode(compiler, entry->translated_source.get()); 1821 ShGetObjectCode(compiler, entry->translated_source.get());
1814 } 1822 }
1815 entry->is_valid = true; 1823 entry->is_valid = true;
1816 return true; 1824 return true;
1817 } 1825 }
1818 1826
1819 } // namespace gpu 1827 } // namespace gpu
1820 } // namespace webkit 1828 } // namespace webkit
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698