Home | History | Annotate | Download | only in surfaceflinger

Lines Matching refs:Transform

133     mCurrentState.active.transform.set(0, 0);
458 Transform t = getTransform();
459 win = t.transform(win);
481 auto const screenTransparentRegion = t.transform(s.activeTransparentRegion);
509 Transform t = getTransform();
511 win = t.transform(win);
513 transform(win);
530 // a viewport clipping and a window transform. we should use floating point to fix this.
537 Transform t = getTransform();
538 activeCrop = t.transform(activeCrop);
565 Transform t = getTransform();
567 activeCrop = t.inverse().transform(activeCrop);
569 // This needs to be here as transform.transform(Rect) computes the
572 // transform.inverse().transform(transform.transform(Rect)) != Rect
582 // Transform the window crop to match the buffer coordinate system,
583 // which means using the inverse of the current transform set on the
588 * the code below applies the primary display's inverse transform to the
593 // calculate the inverse transform
598 // and apply to the current transform
599 invTransform = (Transform(invTransformOrient) * Transform(invTransform))
620 const Rect winCrop = activeCrop.transform(
672 // this gives us only the "orientation" component of the transform
692 // apply the layer's transform, followed by the display's global transform
693 // here we're guaranteed that the layer's transform preserves rects
695 Transform t = getTransform();
698 activeCrop = t.transform(activeCrop);
706 activeCrop = t.inverse().transform(activeCrop, true);
707 // This needs to be here as transform.transform(Rect) computes the
710 // transform.inverse().transform(transform.transform(Rect)) != Rect
726 Rect frame(t.transform(computeBounds(activeTransparentRegion)));
736 const Transform& tr(displayDevice->getTransform());
737 Rect transformedFrame = tr.transform(frame);
786 const Transform& tr(hw->getTransform());
787 layer.setFrame(tr.transform(frame));
800 const Transform bufferOrientation(mCurrentTransform);
801 Transform transform(tr * t * bufferOrientation);
805 * the code below applies the primary display's inverse transform to the
810 // calculate the inverse transform
817 * Here we cancel out the orientation component of the WM transform.
822 transform = Transform(invTransform) * tr * bufferOrientation;
825 // this gives us only the "orientation" component of the transform
826 const uint32_t orientation = transform.getOrientation();
828 if (orientation & Transform::ROT_INVALID) {
832 auto transform = static_cast<HWC2::Transform>(orientation);
833 auto error = hwcLayer->setTransform(transform);
834 ALOGE_IF(error != HWC2::Error::None, "[%s] Failed to set transform %s: "
835 "%s (%d)", mName.string(), to_string(transform).c_str(),
839 if (orientation & Transform::ROT_INVALID) {
861 const Transform& tr = displayDevice->getTransform();
863 Region visible = tr.transform(visibleRegion.intersect(viewport));
913 // Clear out the transform, because it doesn't make sense absent a
915 error = hwcLayer->setTransform(HWC2::Transform::None);
917 ALOGE("[%s] Failed to clear transform: %s (%d)", mName.string(),
963 const Transform& tr = hw->getTransform();
964 Region visible = tr.transform(visibleRegion.intersect(hw->getViewport()));
987 // This gives us only the "orientation" component of the transform
990 // Apply the layer's transform, followed by the display's global transform
991 // Here we're guaranteed that the layer's transform preserves rects
998 Rect frame(getTransform().transform(bounds));
1004 auto position = displayTransform.transform(frame);
1036 // this gives us only the "orientation" component of the transform
1039 // apply the layer's transform, followed by the display's global transform
1040 // here we're guaranteed that the layer's transform preserves rects
1047 Rect frame(getTransform().transform(bounds));
1052 const Transform& tr(hw->getTransform());
1053 return Rect(tr.transform(frame));
1074 static constexpr mat4 inverseOrientation(uint32_t transform) {
1080 if (transform & NATIVE_WINDOW_TRANSFORM_ROT_90) {
1083 if (transform & NATIVE_WINDOW_TRANSFORM_FLIP_H) {
1086 if (transform & NATIVE_WINDOW_TRANSFORM_FLIP_V) {
1117 under.orSelf( hw->getTransform().transform(layer->visibleRegion) );
1152 * the code below applies the primary display's inverse transform to
1153 * the texture transform
1155 uint32_t transform =
1157 mat4 tr = inverseOrientation(transform);
1230 Transform t = getTransform();
1232 win = t.transform(win);
1236 win = t.inverse().transform(win);
1322 ALOGW("%s: Error %s (%d) while querying window sticky transform.", __FUNCTION__,
1441 const Transform hwTransform(hw->getTransform());
1450 Transform layerTransform = getTransform();
1452 lt = layerTransform.transform(lt);
1453 lb = layerTransform.transform(lb);
1454 rb = layerTransform.transform(rb);
1455 rt = layerTransform.transform(rt);
1466 position[0] = hwTransform.transform(lt);
1467 position[1] = hwTransform.transform(lb);
1468 position[2] = hwTransform.transform(rb);
1469 position[3] = hwTransform.transform(rt);
1722 // states, as can be seen below. Largely this arises from position and transform
1729 float tx = c.active.transform.tx();
1730 float ty = c.active.transform.ty();
1732 c.active.transform.set(tx, ty);
1751 const uint8_t type = c.active.transform.getType();
1752 mNeedsFiltering = (!c.active.transform.preserveRects() ||
1753 (type >= Transform::SCALE));
1781 if (mCurrentState.requested.transform.tx() == x && mCurrentState.requested.transform.ty() == y)
1786 // we want to apply the position portion of the transform matrix immediately,
1788 mCurrentState.requested.transform.set(x, y);
1792 // the transform, but use different latching rules.
1794 mCurrentState.active.transform.set(x, y);
1894 mCurrentState.requested.transform.set(
2192 return getTransform().transform(Region(Rect(s.active.w, s.active.h)));
2333 const uint32_t transform(mSurfaceFlingerConsumer->getCurrentTransform());
2336 (transform != mCurrentTransform) ||
2340 mCurrentTransform = transform;
2384 // transform the dirty region to window-manager space
2385 outDirtyRegion = (getTransform().transform(dirtyRegion));
2407 // The transform hint is used to improve performance, but we can
2408 // only have a single transform hint, it cannot
2410 const Transform& planeTransform(hw->getTransform());
2412 if (orientation & Transform::ROT_INVALID) {
2455 s.active.transform.tx(), s.active.transform.ty(),
2464 s.active.transform[0][0], s.active.transform[0][1],
2465 s.active.transform[1][0], s.active.transform[1][1],
2749 Transform Layer::getTransform() const {
2750 Transform t;
2757 // for in the transform. We need to mirror this scaling in child surfaces
2774 Transform extraParentScaling;
2779 return t * getDrawingState().active.transform;