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

Side by Side Diff: cc/output/color_lut_cache.h

Issue 2088273003: Video Color Managament (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: log color space Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/color_lut_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_OUTPUT_COLOR_LUT_CACHE_H_
6 #define CC_OUTPUT_COLOR_LUT_CACHE_H_
7
8 #include <map>
9
10 #include "base/containers/mru_cache.h"
11 #include "base/macros.h"
12 #include "ui/gfx/color_space.h"
13
14 namespace gpu {
15 namespace gles2 {
16 class GLES2Interface;
17 }
18 }
19
20 class ColorLUTCache {
21 public:
22 explicit ColorLUTCache(gpu::gles2::GLES2Interface* gl);
23 ~ColorLUTCache();
24
25 unsigned int GetLUT(const gfx::ColorSpace& from,
26 const gfx::ColorSpace& to,
27 int lut_samples);
28
29 // End of frame, assume all LUTs handed out are no longer used.
30 void Swap();
31
32 private:
33 unsigned int MakeLUT(const gfx::ColorSpace& from,
34 gfx::ColorSpace to,
35 int lut_samples);
36 typedef std::pair<gfx::ColorSpace, std::pair<gfx::ColorSpace, size_t>>
37 CacheKey;
38
39 base::MRUCache<CacheKey, std::pair<unsigned int, size_t>> lut_cache_;
40 uint32_t current_frame_;
41 gpu::gles2::GLES2Interface* gl_;
42 DISALLOW_COPY_AND_ASSIGN(ColorLUTCache);
43 };
44
45 #endif // CC_OUTPUT_COLOR_LUT_CACHE_H_
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/color_lut_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698