blob: 6fdb1840afc22d6473d2eead59116b3762225b9e [file] [log] [blame]
Dan Stozac6998d22015-09-24 17:03:36 -07001/*
2 * Copyright 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_SF_HWC2_ON_1_ADAPTER_H
18#define ANDROID_SF_HWC2_ON_1_ADAPTER_H
19
20#define HWC2_INCLUDE_STRINGIFICATION
21#define HWC2_USE_CPP11
22#include <hardware/hwcomposer2.h>
23#undef HWC2_INCLUDE_STRINGIFICATION
24#undef HWC2_USE_CPP11
25
26#include <ui/Fence.h>
27
28#include <atomic>
29#include <map>
30#include <mutex>
31#include <queue>
32#include <set>
33#include <unordered_map>
34#include <unordered_set>
35#include <vector>
36
37struct hwc_composer_device_1;
38struct hwc_display_contents_1;
39struct hwc_layer_1;
40
41namespace android {
42
43class HWC2On1Adapter : public hwc2_device_t
44{
45public:
46 HWC2On1Adapter(struct hwc_composer_device_1* hwc1Device);
47 ~HWC2On1Adapter();
48
49 struct hwc_composer_device_1* getHwc1Device() const { return mHwc1Device; }
50 uint8_t getHwc1MinorVersion() const { return mHwc1MinorVersion; }
51
52private:
53 static inline HWC2On1Adapter* getAdapter(hwc2_device_t* device) {
54 return static_cast<HWC2On1Adapter*>(device);
55 }
56
57 // getCapabilities
58
59 void doGetCapabilities(uint32_t* outCount,
60 int32_t* /*hwc2_capability_t*/ outCapabilities);
61 static void getCapabilitiesHook(hwc2_device_t* device, uint32_t* outCount,
62 int32_t* /*hwc2_capability_t*/ outCapabilities) {
63 getAdapter(device)->doGetCapabilities(outCount, outCapabilities);
64 }
65
66 // getFunction
67
68 hwc2_function_pointer_t doGetFunction(HWC2::FunctionDescriptor descriptor);
69 static hwc2_function_pointer_t getFunctionHook(hwc2_device_t* device,
70 int32_t intDesc) {
71 auto descriptor = static_cast<HWC2::FunctionDescriptor>(intDesc);
72 return getAdapter(device)->doGetFunction(descriptor);
73 }
74
75 // Device functions
76
77 HWC2::Error createVirtualDisplay(uint32_t width, uint32_t height,
78 hwc2_display_t* outDisplay);
79 static int32_t createVirtualDisplayHook(hwc2_device_t* device,
80 uint32_t width, uint32_t height, hwc2_display_t* outDisplay) {
81 auto error = getAdapter(device)->createVirtualDisplay(width, height,
82 outDisplay);
83 return static_cast<int32_t>(error);
84 }
85
86 HWC2::Error destroyVirtualDisplay(hwc2_display_t display);
87 static int32_t destroyVirtualDisplayHook(hwc2_device_t* device,
88 hwc2_display_t display) {
89 auto error = getAdapter(device)->destroyVirtualDisplay(display);
90 return static_cast<int32_t>(error);
91 }
92
93 std::string mDumpString;
94 void dump(uint32_t* outSize, char* outBuffer);
95 static void dumpHook(hwc2_device_t* device, uint32_t* outSize,
96 char* outBuffer) {
97 getAdapter(device)->dump(outSize, outBuffer);
98 }
99
100 uint32_t getMaxVirtualDisplayCount();
101 static uint32_t getMaxVirtualDisplayCountHook(hwc2_device_t* device) {
102 return getAdapter(device)->getMaxVirtualDisplayCount();
103 }
104
105 HWC2::Error registerCallback(HWC2::Callback descriptor,
106 hwc2_callback_data_t callbackData, hwc2_function_pointer_t pointer);
107 static int32_t registerCallbackHook(hwc2_device_t* device,
108 int32_t intDesc, hwc2_callback_data_t callbackData,
109 hwc2_function_pointer_t pointer) {
110 auto descriptor = static_cast<HWC2::Callback>(intDesc);
111 auto error = getAdapter(device)->registerCallback(descriptor,
112 callbackData, pointer);
113 return static_cast<int32_t>(error);
114 }
115
116 // Display functions
117
118 class Layer;
119
120 class SortLayersByZ {
121 public:
122 bool operator()(const std::shared_ptr<Layer>& lhs,
123 const std::shared_ptr<Layer>& rhs);
124 };
125
126 class DisplayContentsDeleter {
127 public:
128 void operator()(struct hwc_display_contents_1* contents);
129 };
130
131 class DeferredFence {
132 public:
133 DeferredFence()
134 : mMutex(),
135 mFences({Fence::NO_FENCE, Fence::NO_FENCE}) {}
136
137 void add(int32_t fenceFd) {
138 mFences.emplace(new Fence(fenceFd));
139 mFences.pop();
140 }
141
142 const sp<Fence>& get() const {
143 return mFences.front();
144 }
145
146 private:
147 mutable std::mutex mMutex;
148 std::queue<sp<Fence>> mFences;
149 };
150
151 class FencedBuffer {
152 public:
153 FencedBuffer() : mBuffer(nullptr), mFence(Fence::NO_FENCE) {}
154
155 void setBuffer(buffer_handle_t buffer) { mBuffer = buffer; }
156 void setFence(int fenceFd) { mFence = new Fence(fenceFd); }
157
158 buffer_handle_t getBuffer() const { return mBuffer; }
159 int getFence() const { return mFence->dup(); }
160
161 private:
162 buffer_handle_t mBuffer;
163 sp<Fence> mFence;
164 };
165
166 class Display {
167 public:
168 typedef std::unique_ptr<hwc_display_contents_1,
169 DisplayContentsDeleter> HWC1Contents;
170
171 Display(HWC2On1Adapter& device, HWC2::DisplayType type);
172
173 hwc2_display_t getId() const { return mId; }
174 HWC2On1Adapter& getDevice() const { return mDevice; }
175
176 // Does not require locking because it is set before adding the
177 // Displays to the Adapter's list of displays
178 void setHwc1Id(int32_t id) { mHwc1Id = id; }
179 int32_t getHwc1Id() const { return mHwc1Id; }
180
181 void incDirty() { ++mDirtyCount; }
182 void decDirty() { --mDirtyCount; }
183 bool isDirty() const { return mDirtyCount > 0 || mZIsDirty; }
184
185 // HWC2 Display functions
186 HWC2::Error acceptChanges();
187 HWC2::Error createLayer(hwc2_layer_t* outLayerId);
188 HWC2::Error destroyLayer(hwc2_layer_t layerId);
189 HWC2::Error getActiveConfig(hwc2_config_t* outConfigId);
190 HWC2::Error getAttribute(hwc2_config_t configId,
191 HWC2::Attribute attribute, int32_t* outValue);
192 HWC2::Error getChangedCompositionTypes(uint32_t* outNumElements,
193 hwc2_layer_t* outLayers, int32_t* outTypes);
194 HWC2::Error getConfigs(uint32_t* outNumConfigs,
195 hwc2_config_t* outConfigIds);
196 HWC2::Error getDozeSupport(int32_t* outSupport);
Dan Stozaed40eba2016-03-16 12:33:52 -0700197 HWC2::Error getHdrCapabilities(uint32_t* outNumTypes,
198 int32_t* outTypes, float* outMaxLuminance,
199 float* outMaxAverageLuminance, float* outMinLuminance);
Dan Stozac6998d22015-09-24 17:03:36 -0700200 HWC2::Error getName(uint32_t* outSize, char* outName);
201 HWC2::Error getReleaseFences(uint32_t* outNumElements,
202 hwc2_layer_t* outLayers, int32_t* outFences);
203 HWC2::Error getRequests(int32_t* outDisplayRequests,
204 uint32_t* outNumElements, hwc2_layer_t* outLayers,
205 int32_t* outLayerRequests);
206 HWC2::Error getType(int32_t* outType);
207 HWC2::Error present(int32_t* outRetireFence);
208 HWC2::Error setActiveConfig(hwc2_config_t configId);
209 HWC2::Error setClientTarget(buffer_handle_t target,
210 int32_t acquireFence, int32_t dataspace);
211 HWC2::Error setOutputBuffer(buffer_handle_t buffer,
212 int32_t releaseFence);
213 HWC2::Error setPowerMode(HWC2::PowerMode mode);
214 HWC2::Error setVsyncEnabled(HWC2::Vsync enabled);
215 HWC2::Error validate(uint32_t* outNumTypes,
216 uint32_t* outNumRequests);
217
218 HWC2::Error updateLayerZ(hwc2_layer_t layerId, uint32_t z);
219
220 // Read configs from HWC1 device
221 void populateConfigs();
222
223 // Set configs for a virtual display
224 void populateConfigs(uint32_t width, uint32_t height);
225
226 bool prepare();
227 HWC1Contents cloneRequestedContents() const;
228 void setReceivedContents(HWC1Contents contents);
229 bool hasChanges() const;
230 HWC2::Error set(hwc_display_contents_1& hwcContents);
231 void addRetireFence(int fenceFd);
232 void addReleaseFences(const hwc_display_contents_1& hwcContents);
233
234 std::string dump() const;
235
236 private:
237 class Config {
238 public:
239 Config(Display& display, hwc2_config_t id, uint32_t hwcId)
240 : mDisplay(display),
241 mId(id),
Dan Stozafc4e2022016-02-23 11:43:19 -0800242 mHwcId(hwcId),
243 mAttributes() {}
Dan Stozac6998d22015-09-24 17:03:36 -0700244
245 bool isOnDisplay(const Display& display) const {
246 return display.getId() == mDisplay.getId();
247 }
248
249 hwc2_config_t getId() const { return mId; }
250 uint32_t getHwcId() const { return mHwcId; }
251
252 void setAttribute(HWC2::Attribute attribute, int32_t value);
253 int32_t getAttribute(HWC2::Attribute attribute) const;
254
255 std::string toString() const;
256
257 private:
258 Display& mDisplay;
259 const hwc2_config_t mId;
260 const uint32_t mHwcId;
261 std::unordered_map<HWC2::Attribute, int32_t> mAttributes;
262 };
263
264 class Changes {
265 public:
266 uint32_t getNumTypes() const {
267 return static_cast<uint32_t>(mTypeChanges.size());
268 }
269
270 uint32_t getNumLayerRequests() const {
271 return static_cast<uint32_t>(mLayerRequests.size());
272 }
273
274 const std::unordered_map<hwc2_layer_t, HWC2::Composition>&
275 getTypeChanges() const {
276 return mTypeChanges;
277 }
278
279 const std::unordered_map<hwc2_layer_t, HWC2::LayerRequest>&
280 getLayerRequests() const {
281 return mLayerRequests;
282 }
283
284 int32_t getDisplayRequests() const {
285 int32_t requests = 0;
286 for (auto request : mDisplayRequests) {
287 requests |= static_cast<int32_t>(request);
288 }
289 return requests;
290 }
291
292 void addTypeChange(hwc2_layer_t layerId,
293 HWC2::Composition type) {
294 mTypeChanges.insert({layerId, type});
295 }
296
297 void clearTypeChanges() { mTypeChanges.clear(); }
298
299 void addLayerRequest(hwc2_layer_t layerId,
300 HWC2::LayerRequest request) {
301 mLayerRequests.insert({layerId, request});
302 }
303
304 private:
305 std::unordered_map<hwc2_layer_t, HWC2::Composition>
306 mTypeChanges;
307 std::unordered_map<hwc2_layer_t, HWC2::LayerRequest>
308 mLayerRequests;
309 std::unordered_set<HWC2::DisplayRequest> mDisplayRequests;
310 };
311
312 std::shared_ptr<const Config>
313 getConfig(hwc2_config_t configId) const;
314
315 void reallocateHwc1Contents();
316 void assignHwc1LayerIds();
317
318 void updateTypeChanges(const struct hwc_layer_1& hwc1Layer,
319 const Layer& layer);
320 void updateLayerRequests(const struct hwc_layer_1& hwc1Layer,
321 const Layer& layer);
322
323 void prepareFramebufferTarget();
324
325 static std::atomic<hwc2_display_t> sNextId;
326 const hwc2_display_t mId;
327 HWC2On1Adapter& mDevice;
328
329 std::atomic<size_t> mDirtyCount;
330
331 // The state of this display should only be modified from
332 // SurfaceFlinger's main loop, with the exception of when dump is
333 // called. To prevent a bad state from crashing us during a dump
334 // call, all public calls into Display must acquire this mutex.
335 //
336 // It is recursive because we don't want to deadlock in validate
337 // (or present) when we call HWC2On1Adapter::prepareAllDisplays
338 // (or setAllDisplays), which calls back into Display functions
339 // which require locking.
340 mutable std::recursive_mutex mStateMutex;
341
342 bool mZIsDirty;
343 HWC1Contents mHwc1RequestedContents;
344 HWC1Contents mHwc1ReceivedContents;
345 DeferredFence mRetireFence;
346
347 // Will only be non-null after the layer has been validated but
348 // before it has been presented
349 std::unique_ptr<Changes> mChanges;
350
351 int32_t mHwc1Id;
352 std::vector<std::shared_ptr<Config>> mConfigs;
353 std::shared_ptr<const Config> mActiveConfig;
354 std::string mName;
355 HWC2::DisplayType mType;
356 HWC2::PowerMode mPowerMode;
357 HWC2::Vsync mVsyncEnabled;
358
359 FencedBuffer mClientTarget;
360 FencedBuffer mOutputBuffer;
361
362 std::multiset<std::shared_ptr<Layer>, SortLayersByZ> mLayers;
363 std::unordered_map<size_t, std::shared_ptr<Layer>> mHwc1LayerMap;
364 };
365
366 template <typename ...Args>
367 static int32_t callDisplayFunction(hwc2_device_t* device,
368 hwc2_display_t displayId, HWC2::Error (Display::*member)(Args...),
369 Args... args) {
370 auto display = getAdapter(device)->getDisplay(displayId);
371 if (!display) {
372 return static_cast<int32_t>(HWC2::Error::BadDisplay);
373 }
374 auto error = ((*display).*member)(std::forward<Args>(args)...);
375 return static_cast<int32_t>(error);
376 }
377
378 template <typename MF, MF memFunc, typename ...Args>
379 static int32_t displayHook(hwc2_device_t* device, hwc2_display_t displayId,
380 Args... args) {
381 return HWC2On1Adapter::callDisplayFunction(device, displayId, memFunc,
382 std::forward<Args>(args)...);
383 }
384
385 static int32_t getDisplayAttributeHook(hwc2_device_t* device,
386 hwc2_display_t display, hwc2_config_t config,
387 int32_t intAttribute, int32_t* outValue) {
388 auto attribute = static_cast<HWC2::Attribute>(intAttribute);
389 return callDisplayFunction(device, display, &Display::getAttribute,
390 config, attribute, outValue);
391 }
392
393 static int32_t setPowerModeHook(hwc2_device_t* device,
394 hwc2_display_t display, int32_t intMode) {
395 auto mode = static_cast<HWC2::PowerMode>(intMode);
396 return callDisplayFunction(device, display, &Display::setPowerMode,
397 mode);
398 }
399
400 static int32_t setVsyncEnabledHook(hwc2_device_t* device,
401 hwc2_display_t display, int32_t intEnabled) {
402 auto enabled = static_cast<HWC2::Vsync>(intEnabled);
403 return callDisplayFunction(device, display, &Display::setVsyncEnabled,
404 enabled);
405 }
406
407 // Layer functions
408
409 template <typename T>
410 class LatchedState {
411 public:
412 LatchedState(Layer& parent, T initialValue)
413 : mParent(parent),
414 mPendingValue(initialValue),
415 mValue(initialValue) {}
416
417 void setPending(T value) {
418 if (value == mPendingValue) {
419 return;
420 }
421 if (mPendingValue == mValue) {
422 mParent.incDirty();
423 } else if (value == mValue) {
424 mParent.decDirty();
425 }
426 mPendingValue = value;
427 }
428
429 T getValue() const { return mValue; }
430 T getPendingValue() const { return mPendingValue; }
431
432 bool isDirty() const { return mPendingValue != mValue; }
433
434 void latch() {
435 if (isDirty()) {
436 mValue = mPendingValue;
437 mParent.decDirty();
438 }
439 }
440
441 private:
442 Layer& mParent;
443 T mPendingValue;
444 T mValue;
445 };
446
447 class Layer {
448 public:
449 Layer(Display& display);
450
451 bool operator==(const Layer& other) { return mId == other.mId; }
452 bool operator!=(const Layer& other) { return !(*this == other); }
453
454 hwc2_layer_t getId() const { return mId; }
455 Display& getDisplay() const { return mDisplay; }
456
457 void incDirty() { if (mDirtyCount++ == 0) mDisplay.incDirty(); }
458 void decDirty() { if (--mDirtyCount == 0) mDisplay.decDirty(); }
459 bool isDirty() const { return mDirtyCount > 0; }
460
461 // HWC2 Layer functions
462 HWC2::Error setBuffer(buffer_handle_t buffer, int32_t acquireFence);
463 HWC2::Error setCursorPosition(int32_t x, int32_t y);
464 HWC2::Error setSurfaceDamage(hwc_region_t damage);
465
466 // HWC2 Layer state functions
467 HWC2::Error setBlendMode(HWC2::BlendMode mode);
468 HWC2::Error setColor(hwc_color_t color);
469 HWC2::Error setCompositionType(HWC2::Composition type);
470 HWC2::Error setDisplayFrame(hwc_rect_t frame);
471 HWC2::Error setPlaneAlpha(float alpha);
472 HWC2::Error setSidebandStream(const native_handle_t* stream);
473 HWC2::Error setSourceCrop(hwc_frect_t crop);
474 HWC2::Error setTransform(HWC2::Transform transform);
475 HWC2::Error setVisibleRegion(hwc_region_t visible);
476 HWC2::Error setZ(uint32_t z);
477
478 HWC2::Composition getCompositionType() const {
479 return mCompositionType.getValue();
480 }
481 uint32_t getZ() const { return mZ; }
482
483 void addReleaseFence(int fenceFd);
484 const sp<Fence>& getReleaseFence() const;
485
486 void setHwc1Id(size_t id) { mHwc1Id = id; }
487 size_t getHwc1Id() const { return mHwc1Id; }
488
489 void applyState(struct hwc_layer_1& hwc1Layer, bool applyAllState);
490
491 std::string dump() const;
492
493 private:
494 void applyCommonState(struct hwc_layer_1& hwc1Layer,
495 bool applyAllState);
496 void applySolidColorState(struct hwc_layer_1& hwc1Layer,
497 bool applyAllState);
498 void applySidebandState(struct hwc_layer_1& hwc1Layer,
499 bool applyAllState);
500 void applyBufferState(struct hwc_layer_1& hwc1Layer);
501 void applyCompositionType(struct hwc_layer_1& hwc1Layer,
502 bool applyAllState);
503
504 static std::atomic<hwc2_layer_t> sNextId;
505 const hwc2_layer_t mId;
506 Display& mDisplay;
507 size_t mDirtyCount;
508
509 FencedBuffer mBuffer;
510 std::vector<hwc_rect_t> mSurfaceDamage;
511
512 LatchedState<HWC2::BlendMode> mBlendMode;
513 LatchedState<hwc_color_t> mColor;
514 LatchedState<HWC2::Composition> mCompositionType;
515 LatchedState<hwc_rect_t> mDisplayFrame;
516 LatchedState<float> mPlaneAlpha;
517 LatchedState<const native_handle_t*> mSidebandStream;
518 LatchedState<hwc_frect_t> mSourceCrop;
519 LatchedState<HWC2::Transform> mTransform;
520 LatchedState<std::vector<hwc_rect_t>> mVisibleRegion;
521 uint32_t mZ;
522
523 DeferredFence mReleaseFence;
524
525 size_t mHwc1Id;
526 bool mHasUnsupportedPlaneAlpha;
527 };
528
529 template <typename ...Args>
530 static int32_t callLayerFunction(hwc2_device_t* device,
531 hwc2_display_t displayId, hwc2_layer_t layerId,
532 HWC2::Error (Layer::*member)(Args...), Args... args) {
533 auto result = getAdapter(device)->getLayer(displayId, layerId);
534 auto error = std::get<HWC2::Error>(result);
535 if (error == HWC2::Error::None) {
536 auto layer = std::get<Layer*>(result);
537 error = ((*layer).*member)(std::forward<Args>(args)...);
538 }
539 return static_cast<int32_t>(error);
540 }
541
542 template <typename MF, MF memFunc, typename ...Args>
543 static int32_t layerHook(hwc2_device_t* device, hwc2_display_t displayId,
544 hwc2_layer_t layerId, Args... args) {
545 return HWC2On1Adapter::callLayerFunction(device, displayId, layerId,
546 memFunc, std::forward<Args>(args)...);
547 }
548
549 // Layer state functions
550
551 static int32_t setLayerBlendModeHook(hwc2_device_t* device,
552 hwc2_display_t display, hwc2_layer_t layer, int32_t intMode) {
553 auto mode = static_cast<HWC2::BlendMode>(intMode);
554 return callLayerFunction(device, display, layer,
555 &Layer::setBlendMode, mode);
556 }
557
558 static int32_t setLayerCompositionTypeHook(hwc2_device_t* device,
559 hwc2_display_t display, hwc2_layer_t layer, int32_t intType) {
560 auto type = static_cast<HWC2::Composition>(intType);
561 return callLayerFunction(device, display, layer,
562 &Layer::setCompositionType, type);
563 }
564
565 static int32_t setLayerTransformHook(hwc2_device_t* device,
566 hwc2_display_t display, hwc2_layer_t layer, int32_t intTransform) {
567 auto transform = static_cast<HWC2::Transform>(intTransform);
568 return callLayerFunction(device, display, layer, &Layer::setTransform,
569 transform);
570 }
571
572 static int32_t setLayerZOrderHook(hwc2_device_t* device,
573 hwc2_display_t display, hwc2_layer_t layer, uint32_t z) {
574 return callDisplayFunction(device, display, &Display::updateLayerZ,
575 layer, z);
576 }
577
578 // Adapter internals
579
580 void populateCapabilities();
581 Display* getDisplay(hwc2_display_t id);
582 std::tuple<Layer*, HWC2::Error> getLayer(hwc2_display_t displayId,
583 hwc2_layer_t layerId);
584 void populatePrimary();
585
586 bool prepareAllDisplays();
587 std::vector<struct hwc_display_contents_1*> mHwc1Contents;
588 HWC2::Error setAllDisplays();
589
590 void hwc1Invalidate();
591 void hwc1Vsync(int hwc1DisplayId, int64_t timestamp);
592 void hwc1Hotplug(int hwc1DisplayId, int connected);
593
594 // These are set in the constructor and before any asynchronous events are
595 // possible
596
597 struct hwc_composer_device_1* const mHwc1Device;
598 const uint8_t mHwc1MinorVersion;
599 bool mHwc1SupportsVirtualDisplays;
600
601 class Callbacks;
602 const std::unique_ptr<Callbacks> mHwc1Callbacks;
603
604 std::unordered_set<HWC2::Capability> mCapabilities;
605
606 // These are only accessed from the main SurfaceFlinger thread (not from
607 // callbacks or dump
608
609 std::map<hwc2_layer_t, std::shared_ptr<Layer>> mLayers;
610 std::shared_ptr<Display> mHwc1VirtualDisplay;
611
612 // These are potentially accessed from multiple threads, and are protected
Dan Stozafc4e2022016-02-23 11:43:19 -0800613 // by this mutex. This needs to be recursive, since the HWC1 implementation
614 // can call back into the invalidate callback on the same thread that is
615 // calling prepare.
616 std::recursive_timed_mutex mStateMutex;
Dan Stozac6998d22015-09-24 17:03:36 -0700617
618 struct CallbackInfo {
619 hwc2_callback_data_t data;
620 hwc2_function_pointer_t pointer;
621 };
622 std::unordered_map<HWC2::Callback, CallbackInfo> mCallbacks;
623 bool mHasPendingInvalidate;
624 std::vector<std::pair<int, int64_t>> mPendingVsyncs;
625 std::vector<std::pair<int, int>> mPendingHotplugs;
626
627 std::map<hwc2_display_t, std::shared_ptr<Display>> mDisplays;
628 std::unordered_map<int, hwc2_display_t> mHwc1DisplayMap;
629};
630
631} // namespace android
632
633#endif