aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/nodetypes
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-03-18 09:24:33 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-03-22 09:51:46 +0000
commit83eee56e9c047ff83329fe4a175a4b40fdbcb5d2 (patch)
treee4f07a8996694b1aa5584dd222f5127345e9676e /tests/manual/nodetypes
parent9b6f8bfb5167448ee4c18549c20457ee3b4f510d (diff)
D3D12: Support styled and outlined text
The texture resizing highlighted a potential issue with deferred deletes and texture releases: All the texture management functions are special in the sense that they can be called outside a begin-endFrame. (this is what glyph caches do in fact when resizing is involved) In this case using currentPFrameIndex (referring to the last frame's pframeData slot) seems safe, but using it is in fact incorrect under some scenarios: a resource queued for releasing between frame 1 and 2 cannot be released in beginFrame of frame 3, which was the case until now. The CPU wait in frame 3's beginFrame only guarantees the commands submitted before frame 1's endFrame have completed, and those will not include a wait for the copy queue's commands that are added between frames 1 and 2. Using the next frame's pframeData is not an option either since that would lead to an immediate release once beginFrame is called the next time. Therefore, introduce an out-of-frame queue for deleting and texture slot reuse. With the previous example the release will be done in frame 4, which is safe since everything submitted in frame 2 - which will normally include a wait for the copy queue if there were commands issued there before frame 2 using the to-be-released texture - are guaranteed to be done due to the CPU wait. Change-Id: Iaa3b5f0af991946dc97ba44448823b22cbf419dc Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'tests/manual/nodetypes')
-rw-r--r--tests/manual/nodetypes/Text.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/manual/nodetypes/Text.qml b/tests/manual/nodetypes/Text.qml
index 573bf4c959..fb0c92cb10 100644
--- a/tests/manual/nodetypes/Text.qml
+++ b/tests/manual/nodetypes/Text.qml
@@ -42,6 +42,7 @@ import QtQuick 2.0
Item {
Text {
+ id: text1
anchors.top: parent.top
text: "árvíztűrő tükörfúrógép\nÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP"
}
@@ -58,4 +59,13 @@ Item {
color: "green"
NumberAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; }
}
+
+ Row {
+ anchors.top: text1.bottom
+ anchors.margins: 10
+ Text { font.pointSize: 24; text: "Normal" }
+ Text { font.pointSize: 24; text: "Raised"; style: Text.Raised; styleColor: "#AAAAAA" }
+ Text { font.pointSize: 24; text: "Outline"; style: Text.Outline; styleColor: "red" }
+ Text { font.pointSize: 24; text: "Sunken"; style: Text.Sunken; styleColor: "#AAAAAA" }
+ }
}