Add SampleApp support to GN-win
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4062 Change-Id: I88b10748b49adbf57f247b51eec1b9ca86377800 Reviewed-on: https://skia-review.googlesource.com/4062 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
693a540272
commit
a70558e2bb
37
BUILD.gn
37
BUILD.gn
@ -106,7 +106,10 @@ config("skia_private") {
|
||||
"third_party/ktx",
|
||||
]
|
||||
|
||||
defines = [ "SK_GAMMA_APPLY_TO_A8" ]
|
||||
defines = [
|
||||
"SK_GAMMA_APPLY_TO_A8",
|
||||
"SK_INTERNAL",
|
||||
]
|
||||
if (is_android) {
|
||||
defines += [
|
||||
"SK_GAMMA_EXPONENT=1.4",
|
||||
@ -989,19 +992,45 @@ if (skia_enable_tools) {
|
||||
testonly = true
|
||||
}
|
||||
|
||||
if (skia_enable_gpu) {
|
||||
executable("skpbench") {
|
||||
if (is_linux || is_win) {
|
||||
executable("SampleApp") {
|
||||
sources = [
|
||||
"tools/skpbench/skpbench.cpp",
|
||||
"samplecode/SampleApp.cpp",
|
||||
"samplecode/SamplePictFile.cpp",
|
||||
]
|
||||
if (is_mac) {
|
||||
sources += [ "src/views/mac/skia_mac.mm" ]
|
||||
} else if (is_win) {
|
||||
sources += [ "src/views/win/skia_win.cpp" ]
|
||||
} else if (is_linux) {
|
||||
sources += [ "src/views/unix/skia_unix.cpp" ]
|
||||
}
|
||||
deps = [
|
||||
":flags",
|
||||
":gm",
|
||||
":gpu_tool_utils",
|
||||
":samples",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
":views",
|
||||
]
|
||||
testonly = true
|
||||
}
|
||||
|
||||
if (skia_enable_gpu) {
|
||||
executable("skpbench") {
|
||||
sources = [
|
||||
"tools/skpbench/skpbench.cpp",
|
||||
]
|
||||
deps = [
|
||||
":flags",
|
||||
":gpu_tool_utils",
|
||||
":skia",
|
||||
":tool_utils",
|
||||
]
|
||||
testonly = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# We can't yet build ICU on Windows.
|
||||
|
@ -730,9 +730,8 @@ DEFINE_string(svgDir, "", "Read SVGs from here.");
|
||||
DEFINE_string(sequence, "", "Path to file containing the desired samples/gms to show.");
|
||||
DEFINE_bool(sort, false, "Sort samples by title.");
|
||||
DEFINE_bool(list, false, "List samples?");
|
||||
DEFINE_bool(gpu, false, "Start up with gpu?");
|
||||
DEFINE_bool(startgpu, false, "Start up with gpu?");
|
||||
DEFINE_bool(redraw, false, "Force continuous redrawing, for profiling or debugging tools.");
|
||||
DEFINE_string(key, "", ""); // dummy to enable gm tests that have platform-specific names
|
||||
#ifdef SAMPLE_PDF_FILE_VIEWER
|
||||
DEFINE_string(pdfPath, "", "Path to direcotry of pdf files.");
|
||||
#endif
|
||||
@ -852,7 +851,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
|
||||
|
||||
fDeviceType = kRaster_DeviceType;
|
||||
#if SK_SUPPORT_GPU
|
||||
if (FLAGS_gpu) {
|
||||
if (FLAGS_startgpu) {
|
||||
fDeviceType = kGPU_DeviceType;
|
||||
}
|
||||
#endif
|
||||
@ -1614,7 +1613,7 @@ static sk_sp<SkColorSpace> getMonitorColorSpace() {
|
||||
if (dc) {
|
||||
char icmPath[MAX_PATH + 1];
|
||||
DWORD pathLength = MAX_PATH;
|
||||
BOOL success = GetICMProfile(dc, &pathLength, icmPath);
|
||||
BOOL success = GetICMProfileA(dc, &pathLength, icmPath);
|
||||
DeleteDC(dc);
|
||||
if (success) {
|
||||
sk_sp<SkData> iccData = SkData::MakeFromFileName(icmPath);
|
||||
|
Loading…
Reference in New Issue
Block a user