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

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

Issue 566021: [GPU] GLES2 lost context recovery (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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/common/constants.h ('k') | gpu/demos/framework/plugin.h » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/constants.h ('k') | gpu/demos/framework/plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698