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

Side by Side Diff: cc/output/program_binding.cc

Issue 1916303003: Report lost context from GLES2Implementation based on share group state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lost-share-group: disconnect-channel Created 4 years, 7 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
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | components/mus/gles2/command_buffer_local.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/output/program_binding.h" 5 #include "cc/output/program_binding.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "cc/output/geometry_binding.h" 8 #include "cc/output/geometry_binding.h"
9 #include "gpu/GLES2/gl2extchromium.h" 9 #include "gpu/GLES2/gl2extchromium.h"
10 #include "gpu/command_buffer/client/gles2_interface.h" 10 #include "gpu/command_buffer/client/gles2_interface.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (!shader) 81 if (!shader)
82 return 0u; 82 return 0u;
83 83
84 const char* shader_source_str[] = { shader_source.data() }; 84 const char* shader_source_str[] = { shader_source.data() };
85 int shader_length[] = { static_cast<int>(shader_source.length()) }; 85 int shader_length[] = { static_cast<int>(shader_source.length()) };
86 context->ShaderSource( 86 context->ShaderSource(
87 shader, 1, 87 shader, 1,
88 shader_source_str, 88 shader_source_str,
89 shader_length); 89 shader_length);
90 context->CompileShader(shader); 90 context->CompileShader(shader);
91 #ifndef NDEBUG 91 #if DCHECK_IS_ON()
92 int compiled = 0; 92 int compiled = 0;
93 context->GetShaderiv(shader, GL_COMPILE_STATUS, &compiled); 93 context->GetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
94 if (!compiled) 94 if (!compiled)
95 return 0u; 95 return 0u;
96 #endif 96 #endif
97 return shader; 97 return shader;
98 } 98 }
99 99
100 unsigned ProgramBindingBase::CreateShaderProgram(GLES2Interface* context, 100 unsigned ProgramBindingBase::CreateShaderProgram(GLES2Interface* context,
101 unsigned vertex_shader, 101 unsigned vertex_shader,
(...skipping 26 matching lines...) Expand all
128 context->DeleteShader(fragment_shader_id_); 128 context->DeleteShader(fragment_shader_id_);
129 fragment_shader_id_ = 0; 129 fragment_shader_id_ = 0;
130 } 130 }
131 } 131 }
132 132
133 bool ProgramBindingBase::IsContextLost(GLES2Interface* context) { 133 bool ProgramBindingBase::IsContextLost(GLES2Interface* context) {
134 return context->GetGraphicsResetStatusKHR() != GL_NO_ERROR; 134 return context->GetGraphicsResetStatusKHR() != GL_NO_ERROR;
135 } 135 }
136 136
137 } // namespace cc 137 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | components/mus/gles2/command_buffer_local.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698