Commit Graph

7 Commits

Author SHA1 Message Date
Shawn Rutledge 223f1d45cc tst_qquickcanvasitem: wait for canvas before creating a context
Hopefully this reduces flakiness in CI, following the suggestion from
the error message:

Unable to use getContext() at this time, please wait for available: true

Pick-to: 6.2 6.5
Task-number: QTBUG-41043
Change-Id: I3710163cb197170e590f8fd7d188fa62f32ea649
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-03-11 05:05:24 +01:00
Shawn Rutledge 2bb382f9c2 Make tst_qquickcanvasitem significant again; fix image size rounding
- the test items must be visible, so that waitForRendering() works
- arcTo::test_paint tried to render an out-of-bounds arc, which
  resulted in rendering nothing.  Now renders within the 100x100 canvas.
- painted() is not emitted the first time the Canvas is rendered.
- Canvas.save() saves relative to the directory from which the test is
  run, while Canvas.loadImage() loads relative to the test data
  directory in this autotest (other tests are loading red.png for
  example).  So we need to use absolute paths to test loading and saving
  in the directory where the executable is.
- canvas.getContext('2d').getImageData(8.5, 8.5, 8.5, 8.5)
  now triggers different rounding behavior in QRectF::toRect(),
  after qtbase 88e56d0932a3615231adf40d5ae033e742d72c33:
  it becomes QRect(9,9 8x8).  The assert in qt_create_image_data()
  needs to accommodate that.
- Fixed another pedantic warning in qt_create_image_data a few
  lines above: if it creates the image itself, it needs to round
  the qreal width and height values.

This reverts commit a23ee5c0de and
amends 424cfef3cc and
d142b2d212.

Task-number: QTBUG-41043
Change-Id: I825c2c5a2bbc8d5324c3ba41a681aa68bc25a159
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-03-05 05:52:14 +01:00
Charles Yin 6318560eca Refactor canvas item unit tests
Change-Id: I99ba84889ce360d2def27834f15af43c2bdf29bc
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-05-04 02:39:23 +02:00
Charles Yin 200f783745 Fix context2d transform issues
After calling transform related methods, the current path should be transformed with the same method but in reversal mode.
So that during painting, the painter will apply the CTM to this path again, otherwise path will be transformed twice.

Change-Id: I7e12bdff82dabb408f47152ba07b608872d4093f
Task-number: QTBUG-24988
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-30 05:18:32 +02:00
Gunnar Sletta ddff2017c8 Change smooth to be true by default
Change-Id: Ia74a5c76058a2822e61dfa2f7316ea0612ebc15c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-22 22:00:33 +01:00
Charles Yin 2df64d04be Change the default renderTarget and renderStrategy
As we always use OpenGL and scenegraph render thread now, the best default
render target should be FBO and the best render strategy should be
cooperative mode (use the render thread).

Task-number:QTBUG-23956
Change-Id: I64b070dec566e359d27c84680fef1c691d6ce411
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-03-07 05:03:52 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00