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

Unified Diff: cc/output/shader.h

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/gl_renderer.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/shader.h
diff --git a/cc/output/shader.h b/cc/output/shader.h
index dec1379e7d8132cb917888c47e15d73b2a16ed0c..155efcee2b74b0d767687a952092a82e4e22c33c 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -28,13 +28,19 @@ enum TexCoordPrecision {
TexCoordPrecisionHigh,
};
+// Note: The highp_threshold_cache must be provided by the caller to make
+// the caching multi-thread/context safe in an easy low-overhead manner.
+// The caller must make sure to clear highp_threshold_cache to 0, so it can be
+// reinitialized, if a new or different context is used.
CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired(
WebKit::WebGraphicsContext3D* context,
+ int *highp_threshold_cache,
int highp_threshold_min,
gfx::Point max_coordinate);
CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired(
WebKit::WebGraphicsContext3D* context,
+ int *highp_threshold_cache,
int highp_threshold_min,
gfx::Size max_size);
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698