| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ief81868a8d314f7e7722fc0cb6670ae0dc4da50f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NOTE: Now that we have configurable palettes, we cannot assume that
the default color of the indicator image matches the default palette
color. Therefore we need to make ColorImage aware of the default color
to avoid unnecessary expensive colorizing (see f0697c6). An extra QML
property assignment of a constant value is much cheaper than colorizing
the image.
Starting from f0697c6, the indicator color has been defined like this:
color: control.visualFocus ? Default.focusColor : undefined
This assumes that the image has a default color of #353637 when not
focused. With this, qmlbench delegates_dial.qml gives a result of 76
frames.
The following options were considered:
A)
color: visualFocus ? palette.highlight : palette.dark
=> 71 frames
B)
color: visualFocus ? palette.highlight :
palette.dark !== "#353637" ? palette.dark : "transparent"
=> 71 frames
C)
defaultColor: "#353637"
color: visualFocus ? palette.highlight : palette.dark
=> 75 frames
The last option was a clear winner.
Task-number: QTBUG-63369
Change-Id: Ib8d56724de55b874d1c4ecdf0c09b91cfd2dc3df
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickColorImageProvider got replaced by QQuickColorImage in 9fc3659.
This seems to have introduced a performance regression in several
controls that are now colorizing images even when there's no need to.
Various indicator images have the correct default color that matches
the normal state. They need to be colorized only when gaining focus
or being disabled, for example.
The improvement in qmlbench results:
- CheckBox: 70 => 84 frames
- ComboBox: 88 => 92 frames
- Dial: 73 => 77 frames
- MenuItem: 73 => 84 frames
Change-Id: I9155042542f5069cff201a1730b9dd2a62cffd67
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
Now that QQuickImage is exported, we can colorize images using a
simple QQuickImage subclass instead of using an image provider. The
main issue with QQuickColorImageProvider was that it was based on
QGuiApplication::devicePixelRatio(). Now each QQuickColorImage handles
its device pixel ratio correctly depending on which screen it is on.
Even though we now have to use two bindings (color and source) instead
of encoding the color to the source, at the same time we can remove the
sourceSize bindings that were added as image provider specific high DPI
workarounds (ca87ab8).
Task-number: QTBUG-58925
Change-Id: Iba14d2afe3bda540189682ba5be7c58d907d88f7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|