summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLouai Al-Khanji <louai.al-khanji@digia.com>2013-12-04 13:40:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-10 15:10:29 +0100
commitb9362903b339e57362a7a3296904504521d0e26f (patch)
treeea5f735c17d958fa00f7cf46e40e86be10ed0e26 /tools
parent5a2fc4c367d4645ae3350fdcfb6c1bbd0e9c1a97 (diff)
Add new direct2d platform plugin
This is an alternative plugin for the windows platform. It shares most code with the current windows plugin, but substitutes a direct2d-based paint engine for window backing stores and pixmaps. Change-Id: I78fafd9c5871fa090b49436f5b40ec80f8789f8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3ad9339f4f..c0f37feb25 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -182,6 +182,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "QML_DEBUG" ] = "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "no";
dictionary[ "DIRECTWRITE" ] = "no";
+ dictionary[ "DIRECT2D" ] = "no";
dictionary[ "NIS" ] = "no";
dictionary[ "NEON" ] = "auto";
dictionary[ "LARGE_FILE" ] = "yes";
@@ -1218,6 +1219,12 @@ void Configure::parseCmdLine()
dictionary["DIRECTWRITE"] = "no";
}
+ else if (configCmdLine.at(i) == "-direct2d") {
+ dictionary["DIRECT2D"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-direct2d") {
+ dictionary["DIRECT2D"] = "no";
+ }
+
else if (configCmdLine.at(i) == "-nis") {
dictionary["NIS"] = "yes";
} else if (configCmdLine.at(i) == "-no-nis") {
@@ -1939,6 +1946,11 @@ bool Configure::displayHelp()
desc("DIRECTWRITE", "no", "-no-directwrite", "Do not build support for DirectWrite font rendering.");
desc("DIRECTWRITE", "yes", "-directwrite", "Build support for DirectWrite font rendering (experimental, requires DirectWrite availability on target systems, e.g. Windows Vista with Platform Update, Windows 7, etc.)\n");
+ desc("DIRECT2D", "no", "-no-direct2d", "Do not build the Direct2D platform plugin.");
+ desc("DIRECT2D", "yes", "-direct2d", "Build the Direct2D platform plugin (experimental,\n"
+ "requires Direct2D availability on target systems,\n"
+ "e.g. Windows 7 with Platform Update, Windows 8, etc.)\n");
+
desc( "-no-style-<style>", "Disable <style> entirely.");
desc( "-qt-style-<style>", "Enable <style> in the Qt Library.\nAvailable styles: ");
@@ -2206,6 +2218,8 @@ bool Configure::checkAvailability(const QString &part)
available = findFile("mfapi.h") && findFile("mf.lib");
} else if (part == "DIRECTWRITE") {
available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib");
+ } else if (part == "DIRECT2D") {
+ available = tryCompileProject("qpa/direct2d");
} else if (part == "ICONV") {
available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv");
} else if (part == "INOTIFY") {
@@ -2441,6 +2455,13 @@ bool Configure::verifyConfiguration()
prompt = true;
}
+ if (dictionary["DIRECT2D"] == "yes" && !checkAvailability("DIRECT2D")) {
+ cout << "WARNING: To be able to build the Direct2D platform plugin you will" << endl
+ << "need the Microsoft DirectWrite and Microsoft Direct2D development" << endl
+ << "files such as headers and libraries." << endl;
+ prompt = true;
+ }
+
// -angle given on command line, but Direct X cannot be found.
if (dictionary["ANGLE"] != "no") {
QString errorMessage;
@@ -2730,6 +2751,9 @@ void Configure::generateOutputVars()
if (dictionary["DIRECTWRITE"] == "yes")
qtConfig += "directwrite";
+ if (dictionary["DIRECT2D"] == "yes")
+ qtConfig += "direct2d";
+
if (dictionary[ "NATIVE_GESTURES" ] == "yes")
qtConfig += "native-gestures";
@@ -3574,6 +3598,11 @@ void Configure::displayConfig()
sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl;
sout << endl;
+ sout << "QPA Backends:" << endl;
+ sout << " GDI....................." << "yes" << endl;
+ sout << " Direct2D................" << dictionary[ "DIRECT2D" ] << endl;
+ sout << endl;
+
sout << "Third Party Libraries:" << endl;
sout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl;
sout << " GIF support............." << dictionary[ "GIF" ] << endl;