summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Courtney Goeltzenleuchter <courtneygo@google.com> 2016-07-12 23:12:00 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-07-12 23:12:01 +0000
commit72d1772eca21cd1d109a7fe6ee927cbda4df64bc (patch)
tree88bb1f1f76eb4342ccbd88c3e5032ac617488c56 /services/surfaceflinger/SurfaceFlinger.cpp
parent3717b164fad9308483fd75eff85fdefb21a9bd12 (diff)
parentfad9d8cd070e94749d8eb5be8f92011c9567a44c (diff)
Merge changes Iea048eaa,I5c246571 into nyc-mr1-dev
* changes: Add support for multiple color modes Remove unused DisplayInfo structure
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;