Commit 07a8725b authored by brettw@chromium.org's avatar brettw@chromium.org

Add GN buildfile for gfx

Adds libjpeg and some global flags for Ozone from the GYP build.

Improves error messages for mismatched item types I noticed when writing this patch (changes in builder.cc).

BUG=
R=bradnelson@google.com

Review URL: https://codereview.chromium.org/224633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263086 0039d316-1c4b-4281-b951-d872f2087c98
parent 0e83fe8c
...@@ -44,7 +44,7 @@ group("root") { ...@@ -44,7 +44,7 @@ group("root") {
"//third_party/zlib", "//third_party/zlib",
"//tools/gn", "//tools/gn",
"//ui/events", "//ui/events",
"//ui/gfx/geometry", "//ui/gfx",
"//url", "//url",
] ]
......
...@@ -29,6 +29,10 @@ config("executable_ldconfig") { ...@@ -29,6 +29,10 @@ config("executable_ldconfig") {
] ]
} }
pkg_config("dridrm") {
packages = [ "libdrm" ]
}
config("fontconfig") { config("fontconfig") {
libs = [ "fontconfig" ] libs = [ "fontconfig" ]
} }
......
...@@ -60,3 +60,4 @@ use_glib = is_linux ...@@ -60,3 +60,4 @@ use_glib = is_linux
use_clipboard_aurax11 = is_linux && use_aura && use_x11 use_clipboard_aurax11 = is_linux && use_aura && use_x11
ozone_platform_dri = use_ozone
...@@ -380,6 +380,8 @@ ...@@ -380,6 +380,8 @@
'src/core/SkPicturePlayback.h', 'src/core/SkPicturePlayback.h',
'src/core/SkPictureRecord.cpp', 'src/core/SkPictureRecord.cpp',
'src/core/SkPictureRecord.h', 'src/core/SkPictureRecord.h',
'src/core/SkPictureShader.cpp',
'src/core/SkPictureShader.h',
'src/core/SkPictureStateTree.cpp', 'src/core/SkPictureStateTree.cpp',
'src/core/SkPictureStateTree.h', 'src/core/SkPictureStateTree.h',
'src/core/SkPixelRef.cpp', 'src/core/SkPixelRef.cpp',
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("libjpeg") {
sources = [
"jcapimin.c",
"jcapistd.c",
"jccoefct.c",
"jccolor.c",
"jcdctmgr.c",
"jchuff.c",
"jchuff.h",
"jcinit.c",
"jcmainct.c",
"jcmarker.c",
"jcmaster.c",
"jcomapi.c",
"jconfig.h",
"jcparam.c",
"jcphuff.c",
"jcprepct.c",
"jcsample.c",
"jdapimin.c",
"jdapistd.c",
"jdatadst.c",
"jdatasrc.c",
"jdcoefct.c",
"jdcolor.c",
"jdct.h",
"jddctmgr.c",
"jdhuff.c",
"jdhuff.h",
"jdinput.c",
"jdmainct.c",
"jdmarker.c",
"jdmaster.c",
"jdmerge.c",
"jdphuff.c",
"jdpostct.c",
"jdsample.c",
"jerror.c",
"jerror.h",
"jfdctflt.c",
"jfdctfst.c",
"jfdctint.c",
"jidctflt.c",
"jidctfst.c",
"jidctint.c",
"jinclude.h",
"jmemmgr.c",
"jmemnobs.c",
"jmemsys.h",
"jmorecfg.h",
"jpegint.h",
"jpeglib.h",
"jquant1.c",
"jquant2.c",
"jutils.c",
"jversion.h",
]
defines = [ "NO_GETENV" ] # getenv() is not thread-safe.
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
...@@ -251,6 +251,7 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label, ...@@ -251,6 +251,7 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label,
if (!record) { if (!record) {
// Not seen this record yet, create a new one. // Not seen this record yet, create a new one.
record = new BuilderRecord(type, label); record = new BuilderRecord(type, label);
record->set_originally_referenced_from(request_from);
records_[label] = record; records_[label] = record;
return record; return record;
} }
...@@ -259,12 +260,14 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label, ...@@ -259,12 +260,14 @@ BuilderRecord* Builder::GetOrCreateRecordOfType(const Label& label,
if (record->type() != type) { if (record->type() != type) {
*err = Err(request_from, "Item type does not match.", *err = Err(request_from, "Item type does not match.",
"The item \"" + label.GetUserVisibleName(false) + "The item \"" + label.GetUserVisibleName(false) +
"\" was expected\nto be a " + "\"\nwas expected to be a " +
BuilderRecord::GetNameForType(type) + BuilderRecord::GetNameForType(type) +
" but was previously\n referenced as a " + " but was previously referenced as a " +
BuilderRecord::GetNameForType(record->type())); BuilderRecord::GetNameForType(record->type()));
err->AppendSubErr(Err(record->originally_referenced_from(), if (record->originally_referenced_from()) {
"The previous reference was here.")); err->AppendSubErr(Err(record->originally_referenced_from(),
"The previous reference was here."));
}
return NULL; return NULL;
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment