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

Unified Diff: cc/output/color_lut_cache.cc

Issue 2769863003: cc: Add pixel tests for transfer function shaders (Closed)
Patch Set: Leave transfer substitutions unchanged Created 3 years, 9 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/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/color_lut_cache.cc
diff --git a/cc/output/color_lut_cache.cc b/cc/output/color_lut_cache.cc
index 1a796dbcf2f23602d6a7d642af80a7968e7ba4cc..f54c1934adfa4b2f7ecc249701e89f0aada1f2d6 100644
--- a/cc/output/color_lut_cache.cc
+++ b/cc/output/color_lut_cache.cc
@@ -81,7 +81,10 @@ unsigned int ColorLUTCache::MakeLUT(const gfx::ColorTransform* transform,
}
}
- unsigned int lut_texture;
+ GLuint previously_bound_texture = 0;
+ GLuint lut_texture = 0;
+ gl_->GetIntegerv(GL_TEXTURE_BINDING_2D,
+ reinterpret_cast<GLint*>(&previously_bound_texture));
gl_->GenTextures(1, &lut_texture);
gl_->BindTexture(GL_TEXTURE_2D, lut_texture);
gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@@ -92,6 +95,7 @@ unsigned int ColorLUTCache::MakeLUT(const gfx::ColorTransform* transform,
lut_samples * lut_samples, 0, GL_RGBA,
sizeof(T) == 1 ? GL_UNSIGNED_BYTE : GL_HALF_FLOAT_OES,
lut.data());
+ gl_->BindTexture(GL_TEXTURE_2D, previously_bound_texture);
return lut_texture;
}
« no previous file with comments | « no previous file | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698