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

Unified Diff: cc/output/program_binding.h

Issue 1168943002: Remove ContextProvider::IsContextLost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextprovider: . Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/program_binding.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/program_binding.h
diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
index 1d5132bdaea6828148ab4d996774a1569fd00ad2..8018cad76e34ca33ef3c6bbdf6abef44aef25d12 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -42,6 +42,8 @@ class ProgramBindingBase {
unsigned fragment_shader);
void CleanupShaders(gpu::gles2::GLES2Interface* context);
+ bool IsContextLost(gpu::gles2::GLES2Interface* context);
+
unsigned program_;
unsigned vertex_shader_id_;
unsigned fragment_shader_id_;
@@ -79,7 +81,7 @@ class ProgramBinding : public ProgramBindingBase {
DCHECK(context_provider);
DCHECK(!initialized_);
- if (context_provider->IsContextLost())
+ if (IsContextLost(context_provider->ContextGL()))
return;
fragment_shader_.set_blend_mode(blend_mode);
@@ -89,7 +91,7 @@ class ProgramBinding : public ProgramBindingBase {
context_provider->ContextGL(),
vertex_shader_.GetShaderString(),
fragment_shader_.GetShaderString(precision, sampler))) {
- DCHECK(context_provider->IsContextLost());
+ DCHECK(IsContextLost(context_provider->ContextGL()));
return;
}
@@ -101,7 +103,7 @@ class ProgramBinding : public ProgramBindingBase {
// Link after binding uniforms
if (!Link(context_provider->ContextGL())) {
- DCHECK(context_provider->IsContextLost());
+ DCHECK(IsContextLost(context_provider->ContextGL()));
return;
}
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/program_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698