Lines Matching refs:DisplayDevice
66 #include "DisplayDevice.h"
246 DisplayDeviceState info(DisplayDevice::DISPLAY_VIRTUAL, secure);
272 void SurfaceFlinger::createBuiltinDisplayLocked(DisplayDevice::DisplayType type) {
283 if (uint32_t(id) >= DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES) {
552 for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
588 if (type == DisplayDevice::DISPLAY_PRIMARY) {
605 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
659 sp<DisplayDevice> device(getDisplayDevice(display));
666 void SurfaceFlinger::setActiveConfigInternal(const sp<DisplayDevice>& hw, int mode) {
677 if (type >= DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES) {
703 sp<DisplayDevice> hw(mFlinger.getDisplayDevice(mDisplay));
707 } else if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
731 for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
750 sp<DisplayDevice> device(getDisplayDevice(display));
757 void SurfaceFlinger::setActiveColorModeInternal(const sp<DisplayDevice>& hw,
769 if (type >= DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES) {
798 sp<DisplayDevice> hw(mFlinger.getDisplayDevice(mDisplay));
802 } else if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
832 sp<const DisplayDevice> displayDevice(getDisplayDevice(display));
833 if (displayDevice == nullptr) {
834 ALOGE("getHdrCapabilities: Invalid display %p", displayDevice.get());
839 mHwc->getHdrCapabilities(displayDevice->getHwcDisplayId());
967 if (disp == DisplayDevice::DISPLAY_PRIMARY) {
973 int32_t type = DisplayDevice::DISPLAY_PRIMARY;
974 createBuiltinDisplayLocked(DisplayDevice::DISPLAY_PRIMARY);
983 DisplayDevice::DISPLAY_PRIMARY, consumer);
984 sp<DisplayDevice> hw = new DisplayDevice(this,
985 DisplayDevice::DISPLAY_PRIMARY, disp, isSecure, token, fbs,
989 auto type = DisplayDevice::DISPLAY_EXTERNAL;
1070 const sp<DisplayDevice>& displayDevice = mDisplays[displayId];
1072 mHwc->hasClientComposition(displayDevice->getHwcDisplayId());
1090 const sp<DisplayDevice>& hw(mDisplays[dpy]);
1115 auto& displayDevice = mDisplays[displayId];
1116 if (!displayDevice->isDisplayOn()) {
1120 status_t result = displayDevice->prepareFrame(*mHwc);
1169 const sp<const DisplayDevice> hw(getDefaultDisplayDevice());
1230 const sp<DisplayDevice>& displayDevice(mDisplays[dpy]);
1231 const Transform& tr(displayDevice->getTransform());
1232 const Rect bounds(displayDevice->getBounds());
1233 if (displayDevice->isDisplayOn()) {
1235 displayDevice->getLayerStack(), dirtyRegion,
1242 if (s.layerStack == displayDevice->getLayerStack()) {
1251 layer->setHwcLayer(displayDevice->getHwcDisplayId(),
1257 displayDevice->setVisibleLayersSortedByZ(layersSortedByZ);
1258 displayDevice->undefinedRegion.set(bounds);
1259 displayDevice->undefinedRegion.subtractSelf(
1261 displayDevice->dirtyRegion.orSelf(dirtyRegion);
1285 ALOGV_IF(mDisplays[dpy]->getDisplayType() == DisplayDevice::DISPLAY_VIRTUAL,
1303 sp<const DisplayDevice> displayDevice(mDisplays[dpy]);
1304 const auto hwcId = displayDevice->getHwcDisplayId();
1307 displayDevice->getVisibleLayersSortedByZ());
1321 layer->setGeometry(displayDevice);
1335 auto& displayDevice = mDisplays[displayId];
1336 const auto hwcId = displayDevice->getHwcDisplayId();
1345 for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
1346 layer->setPerFrameData(displayDevice);
1353 auto& displayDevice = mDisplays[displayId];
1354 if (!displayDevice->isDisplayOn()) {
1358 status_t result = displayDevice->prepareFrame(*mHwc);
1370 const sp<DisplayDevice>& hw(mDisplays[dpy]);
1395 auto& displayDevice = mDisplays[displayId];
1396 if (!displayDevice->isDisplayOn()) {
1399 const auto hwcId = displayDevice->getHwcDisplayId();
1403 displayDevice->onSwapBuffersCompleted();
1409 displayDevice->makeCurrent(mEGLDisplay, mEGLContext);
1411 for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
1414 releaseFence = displayDevice->getClientTargetAcquireFence();
1518 const sp<const DisplayDevice> defaultDisplay(getDefaultDisplayDevice());
1520 sp<DisplayDevice> hw(getDisplayDevice(draw.keyAt(i)));
1523 if (draw[i].type < DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES)
1537 // recreating the DisplayDevice, so we just remove it
1540 sp<DisplayDevice> hw(getDisplayDevice(display));
1550 const sp<DisplayDevice> disp(getDisplayDevice(display));
1586 // etc.) but no internal state (i.e. a DisplayDevice).
1627 if (state.type == DisplayDevice::DISPLAY_EXTERNAL) {
1628 hwcId = DisplayDevice::DISPLAY_EXTERNAL;
1630 DisplayDevice::DISPLAY_EXTERNAL,
1641 sp<DisplayDevice> hw = new DisplayDevice(this,
1679 sp<const DisplayDevice> disp;
1694 sp<const DisplayDevice> hw(mDisplays[dpy]);
1758 auto& displayDevice = mDisplays[displayId];
1759 if (displayDevice->getHwcDisplayId() < 0) {
1763 for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
1764 layer->updateCursorPosition(displayDevice);
1930 const sp<DisplayDevice>& hw(mDisplays[dpy]);
1995 void SurfaceFlinger::doDisplayComposition(const sp<const DisplayDevice>& hw,
2016 if (flags & DisplayDevice::SWAP_RECTANGLE) {
2022 if (flags & DisplayDevice::PARTIAL_UPDATES) {
2026 // rectangle instead of a region (see DisplayDevice::flip())
2045 const sp<const DisplayDevice>& displayDevice, const Region& dirty)
2049 const auto hwcId = displayDevice->getHwcDisplayId();
2063 if (!displayDevice->makeCurrent(mEGLDisplay, mEGLContext)) {
2064 ALOGW("DisplayDevice::makeCurrent failed. Aborting surface composition for display %s",
2065 displayDevice->getDisplayName().string());
2068 ALOGE("DisplayDevice::makeCurrent on default display failed. Aborting.");
2084 const Region bounds(displayDevice->getBounds());
2089 const Region letterbox(bounds.subtract(displayDevice->getScissor()));
2092 Region region(displayDevice->undefinedRegion.merge(letterbox));
2100 drawWormhole(displayDevice, region);
2104 if (displayDevice->getDisplayType() != DisplayDevice::DISPLAY_PRIMARY) {
2108 const Rect& bounds(displayDevice->getBounds());
2109 const Rect& scissor(displayDevice->getScissor());
2116 const uint32_t height = displayDevice->getHeight();
2128 const Transform& displayTransform = displayDevice->getTransform();
2132 for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
2149 layer->clearWithOpenGL(displayDevice, clip);
2154 layer->draw(displayDevice, clip);
2167 for (auto& layer : displayDevice->getVisibleLayersSortedByZ()) {
2171 layer->draw(displayDevice, clip);
2185 void SurfaceFlinger::drawWormhole(const sp<const DisplayDevice>& hw, const Region& region) const {
2572 d.token = mBuiltinDisplays[DisplayDevice::DISPLAY_PRIMARY];
2602 void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
2615 if (type >= DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES) {
2623 if (type == DisplayDevice::DISPLAY_PRIMARY) {
2645 if (type == DisplayDevice::DISPLAY_PRIMARY) {
2670 sp<DisplayDevice> hw(mFlinger.getDisplayDevice(mDisplay));
2674 } else if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
3006 const sp<const DisplayDevice>& hw(mDisplays[dpy]);
3019 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
3092 dpy = getBuiltInDisplay(DisplayDevice::DISPLAY_PRIMARY);
3214 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
3488 sp<const DisplayDevice> hw(flinger->getDisplayDevice(display));
3518 const sp<const DisplayDevice>& hw,
3585 const sp<const DisplayDevice>& hw,
3749 const sp<const DisplayDevice>& hw, uint32_t minLayerZ, uint32_t maxLayerZ) {
3813 : type(DisplayDevice::DISPLAY_ID_INVALID),
3814 layerStack(DisplayDevice::NO_LAYER_STACK),
3822 DisplayDevice::DisplayType type, bool isSecure)
3824 layerStack(DisplayDevice::NO_LAYER_STACK),