Lines Matching defs:hw

430             sp<DisplayDevice> hw = new DisplayDevice(this,
439 hw->setPowerMode(HWC_POWER_MODE_NORMAL);
441 mDisplays.add(token, hw);
570 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
571 info.orientation = hw->getOrientation();
627 void SurfaceFlinger::setActiveConfigInternal(const sp<DisplayDevice>& hw, int mode) {
628 ALOGD("Set active config mode=%d, type=%d flinger=%p", mode, hw->getDisplayType(),
630 int32_t type = hw->getDisplayType();
631 int currentMode = hw->getActiveConfig();
634 ALOGD("Screen type=%d is already mode=%d", hw->getDisplayType(), mode);
643 hw->setActiveConfig(mode);
663 sp<DisplayDevice> hw(mFlinger.getDisplayDevice(mDisplay));
664 if (hw == NULL) {
667 } else if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
671 mFlinger.setActiveConfigInternal(hw, mMode);
887 const sp<DisplayDevice>& hw(mDisplays[dpy]);
888 if (hw->isDisplayOn()) {
890 const Region dirtyRegion(hw->getDirtyRegion(repaintEverything));
893 doComposeSurfaces(hw, Region(hw->bounds()));
896 const int32_t height = hw->getHeight();
900 hw->compositionComplete();
901 hw->swapBuffers(getHwComposer());
954 const sp<const DisplayDevice> hw(getDefaultDisplayDevice());
955 if (hw->isDisplayOn()) {
987 const sp<DisplayDevice>& hw(mDisplays[dpy]);
988 const Transform& tr(hw->getTransform());
989 const Rect bounds(hw->getBounds());
990 if (hw->isDisplayOn()) {
992 hw->getLayerStack(), dirtyRegion, opaqueRegion);
998 if (s.layerStack == hw->getLayerStack()) {
1008 hw->setVisibleLayersSortedByZ(layersSortedByZ);
1009 hw->undefinedRegion.set(bounds);
1010 hw->undefinedRegion.subtractSelf(tr.transform(opaqueRegion));
1011 hw->dirtyRegion.orSelf(dirtyRegion);
1052 sp<const DisplayDevice> hw(mDisplays[dpy]);
1053 const int32_t id = hw->getHwcDisplayId();
1056 hw->getVisibleLayersSortedByZ());
1063 layer->setGeometry(hw, *cur);
1075 sp<const DisplayDevice> hw(mDisplays[dpy]);
1076 const int32_t id = hw->getHwcDisplayId();
1079 hw->getVisibleLayersSortedByZ());
1089 layer->setPerFrameData(hw, *cur);
1096 sp<const DisplayDevice> hw(mDisplays[dpy]);
1097 const int32_t id = hw->getHwcDisplayId();
1100 hw->getVisibleLayersSortedByZ());
1118 sp<const DisplayDevice> hw(mDisplays[dpy]);
1119 hw->prepareFrame(hwc);
1128 const sp<DisplayDevice>& hw(mDisplays[dpy]);
1129 if (hw->isDisplayOn()) {
1131 const Region dirtyRegion(hw->getDirtyRegion(repaintEverything));
1134 doDisplayComposition(hw, dirtyRegion);
1136 hw->dirtyRegion.clear();
1137 hw->flip(hw->swapRegion);
1138 hw->swapRegion.clear();
1141 hw->compositionComplete();
1171 sp<const DisplayDevice> hw(mDisplays[dpy]);
1172 const Vector< sp<Layer> >& currentLayers(hw->getVisibleLayersSortedByZ());
1173 hw->onSwapBuffersCompleted(hwc);
1175 int32_t id = hw->getHwcDisplayId();
1180 currentLayers[i]->onLayerDisplayed(hw, &*cur);
1184 currentLayers[i]->onLayerDisplayed(hw, NULL);
1278 sp<DisplayDevice> hw(getDisplayDevice(draw.keyAt(i)));
1279 if (hw != NULL)
1280 hw->disconnect(getHwComposer());
1296 sp<DisplayDevice> hw(getDisplayDevice(display));
1297 if (hw != NULL)
1298 hw->disconnect(getHwComposer());
1383 sp<DisplayDevice> hw = new DisplayDevice(this,
1388 hw->setLayerStack(state.layerStack);
1389 hw->setProjection(state.orientation,
1391 hw->setDisplayName(state.displayName);
1392 mDisplays.add(display, hw);
1396 hw->getWidth(), hw->getHeight(),
1397 hw->getFormat());
1443 sp<const DisplayDevice> hw(mDisplays[dpy]);
1444 if (hw->getLayerStack() == currentlayerStack) {
1446 disp = hw;
1508 sp<const DisplayDevice> hw(mDisplays[dpy]);
1509 const int32_t id = hw->getHwcDisplayId();
1514 hw->getVisibleLayersSortedByZ());
1523 Rect cursorPos = layer->getPosition(hw);
1692 const sp<DisplayDevice>& hw(mDisplays[dpy]);
1693 if (hw->getLayerStack() == layerStack) {
1694 hw->dirtyRegion.orSelf(dirty);
1752 void SurfaceFlinger::doDisplayComposition(const sp<const DisplayDevice>& hw,
1759 bool isHwcDisplay = hw->getHwcDisplayId() >= 0;
1767 hw->swapRegion.orSelf(dirtyRegion);
1769 uint32_t flags = hw->getFlags();
1774 dirtyRegion.set(hw->swapRegion.bounds());
1781 dirtyRegion.set(hw->swapRegion.bounds());
1784 dirtyRegion.set(hw->bounds());
1785 hw->swapRegion = dirtyRegion;
1790 if (!doComposeSurfaces(hw, dirtyRegion)) return;
1798 doComposeSurfaces(hw, dirtyRegion);
1803 hw->swapRegion.orSelf(dirtyRegion);
1806 hw->swapBuffers(getHwComposer());
1809 bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const Region& dirty)
1812 const int32_t id = hw->getHwcDisplayId();
1819 if (!hw->makeCurrent(mEGLDisplay, mEGLContext)) {
1821 hw->getDisplayName().string());
1840 const Region bounds(hw->getBounds());
1845 const Region letterbox(bounds.subtract(hw->getScissor()));
1848 Region region(hw->undefinedRegion.merge(letterbox));
1856 drawWormhole(hw, region);
1860 if (hw->getDisplayType() != DisplayDevice::DISPLAY_PRIMARY) {
1864 const Rect& bounds(hw->getBounds());
1865 const Rect& scissor(hw->getScissor());
1872 const uint32_t height = hw->getHeight();
1883 const Vector< sp<Layer> >& layers(hw->getVisibleLayersSortedByZ());
1885 const Transform& tr = hw->getTransform();
1902 layer->clearWithOpenGL(hw, clip);
1907 layer->draw(hw, clip);
1918 layer->setAcquireFence(hw, *cur);
1927 layer->draw(hw, clip);
1937 void SurfaceFlinger::drawWormhole(const sp<const DisplayDevice>& hw, const Region& region) const {
1938 const int32_t height = hw->getHeight();
2320 void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
2322 ALOGD("Set power mode=%d, type=%d flinger=%p", mode, hw->getDisplayType(),
2324 int32_t type = hw->getDisplayType();
2325 int currentMode = hw->getPowerMode();
2328 ALOGD("Screen type=%d is already mode=%d", hw->getDisplayType(), mode);
2332 hw->setPowerMode(mode);
2374 sp<DisplayDevice> hw(mFlinger.getDisplayDevice(mDisplay));
2375 if (hw == NULL) {
2378 } else if (hw->getDisplayType() >= DisplayDevice::DISPLAY_VIRTUAL) {
2382 mFlinger.setPowerModeInternal(hw, mMode);
2620 const sp<const DisplayDevice>& hw(mDisplays[dpy]);
2621 hw->dump(result);
2633 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
2644 hw->undefinedRegion.dump(result, "undefinedRegion");
2646 hw->getOrientation(), hw->isDisplayOn());
2807 case 1008: // toggle use of hw composer
2828 sp<const DisplayDevice> hw(getDefaultDisplayDevice());
2829 reply->writeInt32(hw->getPageFlipCount());
3017 sp<const DisplayDevice> hw(getDisplayDevice(display));
3018 if (hw->getSecureLayerVisible()) {
3075 sp<const DisplayDevice> hw(flinger->getDisplayDevice(display));
3076 result = flinger->captureScreenImplLocked(hw, producer,
3112 const sp<const DisplayDevice>& hw,
3121 const uint32_t hw_w = hw->getWidth();
3122 const uint32_t hw_h = hw->getHeight();
3162 if (state.layerStack == hw->getLayerStack()) {
3166 layer->draw(hw, useIdentityTransform);
3174 hw->compositionComplete();
3175 hw->setViewportAndProjection();
3180 const sp<const DisplayDevice>& hw,
3189 const uint32_t hw_w = hw->getWidth();
3190 const uint32_t hw_h = hw->getHeight();
3239 hw, sourceCrop, reqWidth, reqHeight, minLayerZ, maxLayerZ, true,
3283 hw, minLayerZ, maxLayerZ);
3309 const sp<const DisplayDevice>& hw, uint32_t minLayerZ, uint32_t maxLayerZ) {
3319 minLayerZ, maxLayerZ, hw->getLayerStack());
3325 const bool visible = (state.layerStack == hw->getLayerStack())