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

Unified Diff: cc/output/color_lut_cache.h

Issue 2648043002: Create FP16 LUTs when needed (Closed)
Patch Set: upload floats, let gl convert Created 3 years, 11 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/color_lut_cache.cc » ('j') | cc/output/color_lut_cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/color_lut_cache.h
diff --git a/cc/output/color_lut_cache.h b/cc/output/color_lut_cache.h
index 4ea5732b89d1535c904ed0acd6480020096d8ba3..0529aeab9847e79cb81017bd8fcdec16ac5f30ca 100644
--- a/cc/output/color_lut_cache.h
+++ b/cc/output/color_lut_cache.h
@@ -19,12 +19,16 @@ class GLES2Interface;
class ColorLUTCache {
public:
- explicit ColorLUTCache(gpu::gles2::GLES2Interface* gl);
+ explicit ColorLUTCache(gpu::gles2::GLES2Interface* gl,
+ bool texture_half_float_linear);
~ColorLUTCache();
- unsigned int GetLUT(const gfx::ColorSpace& from,
- const gfx::ColorSpace& to,
- int lut_samples);
+ struct LUT {
+ unsigned int texture;
+ int size;
+ };
+
+ LUT GetLUT(const gfx::ColorSpace& from, const gfx::ColorSpace& to);
// End of frame, assume all LUTs handed out are no longer used.
void Swap();
@@ -32,21 +36,22 @@ class ColorLUTCache {
private:
unsigned int MakeLUT(const gfx::ColorSpace& from,
gfx::ColorSpace to,
- int lut_samples);
+ int lut_samples,
+ int data_type);
- typedef std::pair<gfx::ColorSpace, std::pair<gfx::ColorSpace, size_t>>
- CacheKey;
+ typedef std::pair<gfx::ColorSpace, gfx::ColorSpace> CacheKey;
struct CacheVal {
- CacheVal(unsigned int texture, uint32_t last_used_frame)
- : texture(texture), last_used_frame(last_used_frame) {}
- unsigned int texture;
+ CacheVal(LUT lut, uint32_t last_used_frame)
+ : lut(lut), last_used_frame(last_used_frame) {}
+ LUT lut;
uint32_t last_used_frame;
};
base::MRUCache<CacheKey, CacheVal> lut_cache_;
uint32_t current_frame_;
gpu::gles2::GLES2Interface* gl_;
+ bool texture_half_float_linear_;
DISALLOW_COPY_AND_ASSIGN(ColorLUTCache);
};
« no previous file with comments | « no previous file | cc/output/color_lut_cache.cc » ('j') | cc/output/color_lut_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698