aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger
diff options
context:
space:
mode:
authorGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 14:26:36 +0000
committerGravatar chudy@google.com <chudy@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 14:26:36 +0000
commitbbad34de3b117347bedea619feaf1685586d4202 (patch)
tree574e29f777459c02a60c53c29cfcee6fd74ec48a /debugger
parent82aa7482cbf55ce6d42c692550cadee5e23146e4 (diff)
Effects Bug Fix
Certain compilers in an effort to optimize code chop off files that are never used. By adding a flag to common conditions and variables we can force skia to recompile with global static initializers off. By making a call to SkGraphics::Init we now register all those functions that had been previously automatically excluded by the compiler. Review URL: https://codereview.appspot.com/6443112 git-svn-id: http://skia.googlecode.com/svn/trunk@5057 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'debugger')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp8
-rwxr-xr-xdebugger/make_debugger.sh12
2 files changed, 18 insertions, 2 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index e2d4bf9dd9..a311916dba 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#include <iostream>
#include "SkDebuggerGUI.h"
+#include "SkGraphics.h"
#include <QListWidgetItem>
SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
@@ -91,9 +91,13 @@ SkDebuggerGUI::SkDebuggerGUI(QWidget *parent) :
fMenuEdit.setDisabled(true);
fMenuNavigate.setDisabled(true);
fMenuView.setDisabled(true);
+
+ SkGraphics::Init();
}
-SkDebuggerGUI::~SkDebuggerGUI() {}
+SkDebuggerGUI::~SkDebuggerGUI() {
+ SkGraphics::Term();
+}
void SkDebuggerGUI::actionBreakpoints() {
fBreakpointsActivated = !fBreakpointsActivated;
diff --git a/debugger/make_debugger.sh b/debugger/make_debugger.sh
new file mode 100755
index 0000000000..86a7ff9884
--- /dev/null
+++ b/debugger/make_debugger.sh
@@ -0,0 +1,12 @@
+# Used to recompile required skia libraries with static initializers turned
+# off. This fixes a bug in which the linux compiler was incorrectly stripping
+# required global static methods in an optimization effort.
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+CWD=$SCRIPT_DIR/../
+
+DEFINES="skia_static_initializers=0"
+export GYP_DEFINES="$DEFINES"
+
+make clean -C $CWD
+make -C $CWD debugger -j