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

Unified Diff: cc/output/program_binding.h

Issue 2712033004: cc: Always log shader compiler errors (Closed)
Patch Set: Fix compile Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | 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 6f1bc9148752f4b58a130a81eaf0e2871a9fb9a1..ce45f2692ad4340eecf56832b1820ff447af70f7 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -32,7 +32,9 @@ class ProgramBindingBase {
bool Init(gpu::gles2::GLES2Interface* context,
const std::string& vertex_shader,
const std::string& fragment_shader);
- bool Link(gpu::gles2::GLES2Interface* context);
+ bool Link(gpu::gles2::GLES2Interface* context,
+ const std::string& vertex_source,
+ const std::string& fragment_source);
void Cleanup(gpu::gles2::GLES2Interface* context);
unsigned program() const { return program_; }
@@ -403,9 +405,10 @@ class Program : public ProgramBindingBase {
if (IsContextLost(context_provider->ContextGL()))
return;
- if (!ProgramBindingBase::Init(context_provider->ContextGL(),
- vertex_shader_.GetShaderString(),
- fragment_shader_.GetShaderString())) {
+ std::string vertex_source = vertex_shader_.GetShaderString();
+ std::string fragment_source = fragment_shader_.GetShaderString();
+ if (!ProgramBindingBase::Init(context_provider->ContextGL(), vertex_source,
+ fragment_source)) {
DCHECK(IsContextLost(context_provider->ContextGL()));
return;
}
@@ -417,7 +420,7 @@ class Program : public ProgramBindingBase {
program_, &base_uniform_index);
// Link after binding uniforms
- if (!Link(context_provider->ContextGL())) {
+ if (!Link(context_provider->ContextGL(), vertex_source, fragment_source)) {
DCHECK(IsContextLost(context_provider->ContextGL()));
return;
}
« no previous file with comments | « no previous file | cc/output/program_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698