OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 #include <string> | 10 #include <string> |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 glLinkProgram(program); | 1252 glLinkProgram(program); |
1253 GLenum error = glGetError(); | 1253 GLenum error = glGetError(); |
1254 if (error != GL_NO_ERROR) { | 1254 if (error != GL_NO_ERROR) { |
1255 RemoveProgramInfo(program); | 1255 RemoveProgramInfo(program); |
1256 SetGLError(error); | 1256 SetGLError(error); |
1257 } else { | 1257 } else { |
1258 UpdateProgramInfo(program); | 1258 UpdateProgramInfo(program); |
1259 } | 1259 } |
1260 }; | 1260 }; |
1261 | 1261 |
1262 // NOTE: If you need to know the results of SwapBuffers (like losing | |
1263 // the context) then add a new command. Do NOT make SwapBuffers synchronous. | |
1264 void GLES2DecoderImpl::DoSwapBuffers() { | 1262 void GLES2DecoderImpl::DoSwapBuffers() { |
1265 #if defined(UNIT_TEST) | 1263 #if defined(UNIT_TEST) |
1266 #elif defined(OS_WIN) | 1264 #elif defined(OS_WIN) |
1267 ::SwapBuffers(device_context_); | 1265 ::SwapBuffers(device_context_); |
1268 #elif defined(OS_LINUX) | 1266 #elif defined(OS_LINUX) |
1269 DCHECK(window()); | 1267 DCHECK(window()); |
1270 window()->SwapBuffers(); | 1268 window()->SwapBuffers(); |
1271 #endif | 1269 #endif |
1272 } | 1270 } |
1273 | 1271 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 return error::kNoError; | 1903 return error::kNoError; |
1906 } | 1904 } |
1907 | 1905 |
1908 // Include the auto-generated part of this file. We split this because it means | 1906 // Include the auto-generated part of this file. We split this because it means |
1909 // we can easily edit the non-auto generated parts right here in this file | 1907 // we can easily edit the non-auto generated parts right here in this file |
1910 // instead of having to edit some template or the code generator. | 1908 // instead of having to edit some template or the code generator. |
1911 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 1909 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
1912 | 1910 |
1913 } // namespace gles2 | 1911 } // namespace gles2 |
1914 } // namespace gpu | 1912 } // namespace gpu |
OLD | NEW |