blob: 2cda8e5d120c61388c0af3932953b237c68ef61d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
TEMPLATE=lib
TARGET=customcontext
CONFIG += plugin
contains(QT_VERSION, ^5\\.[2-9]\\..*) {
message("Using Qt 5.2 or later")
CONFIG += customcontext_qt520
}
QT += gui-private core-private quick-private qml-private
!customcontext_qt520:{
QT += v8-private
}
message("")
verbose:{
message("verbose ..................: yes")
DEFINES+=CUSTOMCONTEXT_DEBUG
} else {
message("verbose ..................: no")
}
############################################################
#
# Rendering hooks
#
dither:{
message("dither ...................: yes")
DEFINES += CUSTOMCONTEXT_DITHER
SOURCES += renderhooks/ordereddither2x2.cpp
HEADERS += renderhooks/ordereddither2x2.h
} else {
message("dither ...................: no")
}
############################################################
#
# Textures
#
!customcontext_qt520:{
atlastexture:{
message("atlastexture .............: yes")
DEFINES += CUSTOMCONTEXT_ATLASTEXTURE
SOURCES += texture/atlastexture.cpp
HEADERS += texture/atlastexture.h
INCLUDEPATH += texture
} else {
message("atlastexture .............: no")
}
threaduploadtexture:{
message("threaduploadtexture ......: yes")
DEFINES += CUSTOMCONTEXT_THREADUPLOADTEXTURE
SOURCES += texture/threaduploadtexture.cpp
HEADERS += texture/threaduploadtexture.h
INCLUDEPATH += texture
} else {
message("threaduploadtexture ......: no")
}
mactexture:{
message("mactexture ...............: yes")
DEFINES += CUSTOMCONTEXT_MACTEXTURE
SOURCES += texture/mactexture.cpp
HEADERS += texture/mactexture.h
INCLUDEPATH += texture
} else {
message("mactexture ...............: no")
}
}
eglgralloctexture:{
message("eglgralloctexture ........: yes (remember: ANDROID_SDK_INCLUDE)")
DEFINES += CUSTOMCONTEXT_EGLGRALLOCTEXTURE
SOURCES += texture/eglgralloctexture.cpp
HEADERS += texture/eglgralloctexture.h
INCLUDEPATH += texture $(ANDROID_SDK_INCLUDE) $(ANDROID_SDK_INCLUDE)/android
LIBS += -lhardware -lEGL
} else {
message("eglgralloctexure .........: no")
}
hybristexture :{
message("hybristexture ............: yes")
DEFINES += CUSTOMCONTEXT_HYBRISTEXTURE
SOURCES += texture/hybristexture.cpp
HEADERS += texture/hybristexture.h
INCLUDEPATH += texture
LIBS += -lEGL
} else {
message("hybristexture ............: no")
}
nonpreservedtexture:{
message("nonpreservedtexture ......: yes")
DEFINES += CUSTOMCONTEXT_NONPRESERVEDTEXTURE
SOURCES += texture/nonpreservedtexture.cpp
HEADERS += texture/nonpreservedtexture.h
INCLUDEPATH += texture
} else {
message("nonpreservedtexture ......: no")
}
############################################################
#
# Animation Drivers
#
animationdriver:{
message("animationdriver ..........: yes")
DEFINES += CUSTOMCONTEXT_ANIMATIONDRIVER
SOURCES += animation/animationdriver.cpp
HEADERS += animation/animationdriver.h
} else {
message("animationdriver ..........: no")
}
swaplistenanimationdriver:{
message("swaplistenanimationdriver : yes")
DEFINES += CUSTOMCONTEXT_SWAPLISTENINGANIMATIONDRIVER
SOURCES += animation/swaplisteninganimationdriver.cpp
HEADERS += animation/swaplisteninganimationdriver.h
} else {
message("swaplistenanimationdriver : no")
}
############################################################
#
# Renderers
#
overlaprenderer:{
message("overlaprenderer ..........: yes")
customcontext_qt520:{
message(" *** WARNING: you probably want to be using the default renderer in Qt 5.2 and higher")
message(" as it incorporates the optimizations of the overlaprenderer along with other optimizations ***")
materialpreload:{
message(" materialpreload ........: yes")
DEFINES += CUSTOMCONTEXT_MATERIALPRELOAD
} else {
message(" materialpreload ........: no")
}
}
DEFINES += CUSTOMCONTEXT_OVERLAPRENDERER
SOURCES += renderer/overlaprenderer.cpp
HEADERS += renderer/overlaprenderer.h
} else {
message("overlaprenderer ..........: no")
}
simplerenderer:{
message("simplerenderer ...........: yes")
DEFINES += CUSTOMCONTEXT_SIMPLERENDERER
SOURCES += renderer/simplerenderer.cpp
HEADERS += renderer/simplerenderer.h renderer/qsgbasicshadermanager_p.h renderer/qsgbasicclipmanager_p.h
} else {
message("simplerenderer ...........: no")
}
############################################################
#
# Other stuff
#
!customcontext_qt520:{
materialpreload:{
message("materialpreload ..........: yes")
DEFINES += CUSTOMCONTEXT_MATERIALPRELOAD
} else {
message("materialpreload ..........: no")
}
nodfglyphs:{
message("nodfglyphs ...............: yes")
DEFINES += CUSTOMCONTEXT_NO_DFGLYPHS
} else {
message("nodfglyphs ...............: no")
}
msaa:{
message("msaa .....................: yes")
DEFINES += CUSTOMCONTEXT_MSAA
} else {
message("msaa .....................: no")
}
} else {
programbinary: {
message("programbinary ............: yes")
DEFINES += PROGRAM_BINARY
SOURCES += programbinary.cpp
LIBS += -lEGL
} else {
message("programbinary ............: no")
}
}
surfaceformat:{
message("surfaceformat ............: yes")
DEFINES += CUSTOMCONTEXT_SURFACEFORMAT
} else {
message("surfaceformat ............: no")
}
message("");
message("Enable the above features by adding them to the qmake config, for instance:")
message(" > qmake \"CONFIG+=verbose atlastexture dither\"");
message("");
SOURCES += \
context.cpp \
pluginmain.cpp
HEADERS += \
context.h \
pluginmain.h
OTHER_FILES += customcontext.json
target.path += $$[QT_INSTALL_PLUGINS]/scenegraph
files.path += $$[QT_INSTALL_PLUGINS]/scenegraph
INSTALLS += target files
!win*:DEFINES+=ENABLE_PROFILING
arm_build {
DEFINES += USE_HALF_FLOAT
QMAKE_CXXFLAGS += -mfp16-format=ieee -mfpu=neon
} else {
DEFINES += DESKTOP_BUILD
}
|