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

Unified Diff: cc/output/texture_copier.cc

Issue 14705008: cc: Cache highp_threshold in TexCoordPrecisionRequired (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Remove unnecessary statics. Allow min to vary. Created 7 years, 8 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/texture_copier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/texture_copier.cc
diff --git a/cc/output/texture_copier.cc b/cc/output/texture_copier.cc
index 3b1b708648b0345a5b7462014e64d3d58910e0af..585e8ba9310f7d237b8eff821b192f2ea284dc5a 100644
--- a/cc/output/texture_copier.cc
+++ b/cc/output/texture_copier.cc
@@ -18,7 +18,8 @@ AcceleratedTextureCopier::AcceleratedTextureCopier(
int highp_threshold_min)
: context_(context)
, using_bind_uniforms_(using_bind_uniforms)
- , highp_threshold_min_(highp_threshold_min) {
+ , highp_threshold_min_(highp_threshold_min)
+ , highp_threshold_cache_(0) {
DCHECK(context_);
GLC(context_, fbo_ = context_->createFramebuffer());
GLC(context_, position_buffer_ = context_->createBuffer());
@@ -79,7 +80,7 @@ void AcceleratedTextureCopier::CopyTexture(Parameters parameters) {
GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
TexCoordPrecision texCoordPrecision = TexCoordPrecisionRequired(
- context_, highp_threshold_min_, parameters.size);
+ context_, &highp_threshold_cache_, highp_threshold_min_, parameters.size);
if (texCoordPrecision == TexCoordPrecisionHigh) {
if (!blit_program_highp_->initialized())
blit_program_highp_->Initialize(context_, using_bind_uniforms_);
« no previous file with comments | « cc/output/texture_copier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698