aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-04 06:19:33 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-04 06:19:33 -0700
commit7a1f45f9e584fef625e764bd5d180a9c4943dcd5 (patch)
tree12108cbf1cc8553d97ebbf5241262e4195906b58
parentaa6a80526ff4187b596f78564174b3df10d93c7e (diff)
spin off easy stuff from Herb's windows GN CL
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209533004 No public API changes. TBR=reed@google.com Review-Url: https://codereview.chromium.org/2209533004
-rw-r--r--BUILD.gn6
-rw-r--r--gm/circles.cpp1
-rwxr-xr-xgm/ovals.cpp1
-rw-r--r--gm/rects.cpp1
-rw-r--r--gm/roundrects.cpp1
-rw-r--r--gm/shadows.cpp2
-rw-r--r--gm/tilemodes.cpp4
-rw-r--r--gm/tilemodes_scaled.cpp3
-rw-r--r--gn/win_stamp.py11
-rw-r--r--include/c/sk_types.h2
-rw-r--r--include/core/SkPreConfig.h2
-rw-r--r--tests/BlurTest.cpp1
-rw-r--r--third_party/expat/BUILD.gn2
-rw-r--r--third_party/giflib/BUILD.gn4
-rw-r--r--third_party/libjpeg_turbo/BUILD.gn2
15 files changed, 37 insertions, 6 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 1286a068e0..e2a9a883c1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -53,6 +53,7 @@ config("skia_private") {
"src/ports",
"src/sfnt",
"src/utils",
+ "src/utils/win",
"third_party/etc1",
"third_party/ktx",
]
@@ -178,7 +179,9 @@ component("skia") {
"//third_party/zlib",
]
- libs = [ "pthread" ]
+ if (!is_win) {
+ libs = [ "pthread" ]
+ }
sources = []
sources += core_gypi.sources
@@ -249,6 +252,7 @@ component("skia") {
"src/ports/SkTypeface_win_dw.cpp",
"src/xps/SkDocument_XPS.cpp",
]
+ sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ]
} else {
sources += [
"src/ports/SkDebug_stdio.cpp",
diff --git a/gm/circles.cpp b/gm/circles.cpp
index 2c2542b9dc..53ca5ddb1b 100644
--- a/gm/circles.cpp
+++ b/gm/circles.cpp
@@ -8,6 +8,7 @@
#include "SkBlurDrawLooper.h"
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
+#include "SkColorFilter.h"
#include "SkGradientShader.h"
#include "SkMatrix.h"
#include "SkRandom.h"
diff --git a/gm/ovals.cpp b/gm/ovals.cpp
index 1374b7d35d..272ac433f0 100755
--- a/gm/ovals.cpp
+++ b/gm/ovals.cpp
@@ -10,6 +10,7 @@
#include "SkRandom.h"
#include "SkMatrix.h"
#include "SkBlurMaskFilter.h"
+#include "SkColorFilter.h"
#include "SkGradientShader.h"
#include "SkBlurDrawLooper.h"
#include "SkRect.h"
diff --git a/gm/rects.cpp b/gm/rects.cpp
index 9ec7881f90..28649b21c5 100644
--- a/gm/rects.cpp
+++ b/gm/rects.cpp
@@ -9,6 +9,7 @@
#include "SkBlurDrawLooper.h"
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
+#include "SkColorFilter.h"
#include "SkGradientShader.h"
#include "SkMatrix.h"
#include "SkTArray.h"
diff --git a/gm/roundrects.cpp b/gm/roundrects.cpp
index 514e43acbf..9554705b49 100644
--- a/gm/roundrects.cpp
+++ b/gm/roundrects.cpp
@@ -10,6 +10,7 @@
#include "SkRandom.h"
#include "SkMatrix.h"
#include "SkBlurMaskFilter.h"
+#include "SkColorFilter.h"
#include "SkGradientShader.h"
#include "SkBlurDrawLooper.h"
#include "SkRect.h"
diff --git a/gm/shadows.cpp b/gm/shadows.cpp
index 6263af29bf..fcaeeb72d3 100644
--- a/gm/shadows.cpp
+++ b/gm/shadows.cpp
@@ -8,6 +8,8 @@
#include "gm.h"
#include "SkBlurDrawLooper.h"
#include "SkBlurMask.h"
+#include "SkColorFilter.h"
+#include "SkMaskFilter.h"
#include "SkPath.h"
namespace skiagm {
diff --git a/gm/tilemodes.cpp b/gm/tilemodes.cpp
index bd2dcfef16..c944fe7b7a 100644
--- a/gm/tilemodes.cpp
+++ b/gm/tilemodes.cpp
@@ -5,11 +5,13 @@
* found in the LICENSE file.
*/
#include "gm.h"
+#include "SkColorFilter.h"
+#include "SkMaskFilter.h"
#include "SkPath.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
-#include "SkColorFilter.h"
+
// effects
#include "SkGradientShader.h"
diff --git a/gm/tilemodes_scaled.cpp b/gm/tilemodes_scaled.cpp
index 1645f80b22..897c829a24 100644
--- a/gm/tilemodes_scaled.cpp
+++ b/gm/tilemodes_scaled.cpp
@@ -5,11 +5,12 @@
* found in the LICENSE file.
*/
#include "gm.h"
+#include "SkColorFilter.h"
+#include "SkMaskFilter.h"
#include "SkPath.h"
#include "SkRegion.h"
#include "SkShader.h"
#include "SkUtils.h"
-#include "SkColorFilter.h"
// effects
#include "SkGradientShader.h"
diff --git a/gn/win_stamp.py b/gn/win_stamp.py
new file mode 100644
index 0000000000..3d23dd80a3
--- /dev/null
+++ b/gn/win_stamp.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+#
+# Copyright 2016 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Implement stamp for windows.
+
+import sys
+open(sys.argv[1], 'w').close()
diff --git a/include/c/sk_types.h b/include/c/sk_types.h
index dcbc6f7d9e..baa3ac9ce6 100644
--- a/include/c/sk_types.h
+++ b/include/c/sk_types.h
@@ -25,7 +25,7 @@
#if !defined(SK_API)
#if defined(SKIA_DLL)
- #if defined(SK_BUILD_FOR_WIN32)
+ #if defined(_MSC_VER)
#if SKIA_IMPLEMENTATION
#define SK_API __declspec(dllexport)
#else
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index 806ec8a6d8..d8dd65b910 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -211,7 +211,7 @@
#if !defined(SK_API)
#if defined(SKIA_DLL)
- #if defined(SK_BUILD_FOR_WIN32)
+ #if defined(_MSC_VER)
#if SKIA_IMPLEMENTATION
#define SK_API __declspec(dllexport)
#else
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index c40634c12a..6ccb0471aa 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -9,6 +9,7 @@
#include "SkBlurMaskFilter.h"
#include "SkBlurDrawLooper.h"
#include "SkCanvas.h"
+#include "SkColorFilter.h"
#include "SkEmbossMaskFilter.h"
#include "SkLayerDrawLooper.h"
#include "SkMath.h"
diff --git a/third_party/expat/BUILD.gn b/third_party/expat/BUILD.gn
index ab20ca6761..1219008c74 100644
--- a/third_party/expat/BUILD.gn
+++ b/third_party/expat/BUILD.gn
@@ -9,7 +9,7 @@ declare_args() {
import("../third_party.gni")
third_party("expat") {
- public_include_dirs = [ "../externals/expat" ]
+ public_include_dirs = [ "../externals/expat/lib" ]
defines = [ "HAVE_MEMMOVE" ]
diff --git a/third_party/giflib/BUILD.gn b/third_party/giflib/BUILD.gn
index 96414a93a6..a82bf921fb 100644
--- a/third_party/giflib/BUILD.gn
+++ b/third_party/giflib/BUILD.gn
@@ -11,6 +11,10 @@ import("../third_party.gni")
third_party("giflib") {
public_include_dirs = [ "../externals/giflib" ]
+ if (is_win) {
+ include_dirs = [ "." ]
+ }
+
sources = [
"../externals/giflib/dgif_lib.c",
"../externals/giflib/gif_err.c",
diff --git a/third_party/libjpeg_turbo/BUILD.gn b/third_party/libjpeg_turbo/BUILD.gn
index 726641235f..46d925193e 100644
--- a/third_party/libjpeg_turbo/BUILD.gn
+++ b/third_party/libjpeg_turbo/BUILD.gn
@@ -11,6 +11,8 @@ import("../third_party.gni")
third_party("libjpeg_turbo") {
public_include_dirs = [ "../externals/libjpeg-turbo" ]
+ defines = [ "TURBO_FOR_WINDOWS" ]
+
sources = [
"../externals/libjpeg-turbo/jcapimin.c",
"../externals/libjpeg-turbo/jcapistd.c",