summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Courtney Goeltzenleuchter <courtneygo@google.com> 2016-06-23 11:49:50 -0600
committer Courtney Goeltzenleuchter <courtneygo@google.com> 2016-07-11 14:13:26 -0600
commitfad9d8cd070e94749d8eb5be8f92011c9567a44c (patch)
tree1dc29b99d66a8695cb5ddd4ff4c566bf9890a9d5 /services/surfaceflinger/SurfaceFlinger.cpp
parent1d6c0e979e7e2a490d7403acd7e966da0e642973 (diff)
Add support for multiple color modes
Bug: 29044347 Change-Id: Iea048eaa62f072a9bbefc4f3a6c29a9e593eab69
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index e156e1abf8..5c7db2b32f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -614,9 +614,6 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
info.fps = 1e9 / hwConfig->getVsyncPeriod();
info.appVsyncOffset = VSYNC_EVENT_PHASE_OFFSET_NS;
- // TODO: Hook this back up
- info.colorTransform = 0;
-
// This is how far in advance a buffer must be queued for
// presentation at a given time. If you want a buffer to appear
// on the screen at time N, you must submit the buffer before
@@ -635,7 +632,18 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
// All non-virtual displays are currently considered secure.
info.secure = true;
- configs->push_back(info);
+ // DisplayManager expects each color mode to be its own display
+ // info record.
+ std::vector<int32_t> modes = getHwComposer().getColorModes(type);
+
+ if (modes.size() == 0) {
+ info.colorTransform = 0;
+ configs->push_back(info);
+ }
+ for (int32_t mode : modes) {
+ info.colorTransform = mode;
+ configs->push_back(info);
+ }
}
return NO_ERROR;