Skip to content

Commit

Permalink
clean up Skia include_dirs
Browse files Browse the repository at this point in the history
Skia's recently cleaned itself up so that it can build
with many fewer include_dirs / -Ifoo directives.  This
should let us tidy up skia/BUILD.gn in turn.

Since we had all those include_dirs available, a bunch
of odd Skia includes have slipped through the cracks.
I think this CL cleans them all up so that they're all
relative from chromium/src.

Also, git clang-format... some formatting changes from
that beyond just resorting.

Change-Id: I61fcba9e28a34eb394ec69795887d46728ebc788
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1583060
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654369}
  • Loading branch information
Mike Klein authored and Commit Bot committed Apr 26, 2019
1 parent 5d8a1a3 commit 1bc35d4
Show file tree
Hide file tree
Showing 50 changed files with 93 additions and 163 deletions.
2 changes: 1 addition & 1 deletion components/viz/service/display/resource_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_RESOURCE_METADATA_H_
#define COMPONENTS_VIZ_SERVICE_DISPLAY_RESOURCE_METADATA_H_

#include "GrTypes.h"
#include "components/viz/common/resources/resource_format.h"
#include "components/viz/common/resources/resource_id.h"
#include "components/viz/service/viz_service_export.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "third_party/skia/include/gpu/GrTypes.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/geometry/size.h"

Expand Down
65 changes: 1 addition & 64 deletions skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,7 @@ declare_args() {
# External-facing config for dependent code.
config("skia_config") {
include_dirs = [
"config",
"ext",
"//third_party/skia/",
"//third_party/skia/include/c",
"//third_party/skia/include/codec",
"//third_party/skia/include/core",
"//third_party/skia/include/docs",
"//third_party/skia/include/effects",
"//third_party/skia/include/encode",
"//third_party/skia/include/gpu",
"//third_party/skia/include/pathops",
"//third_party/skia/include/ports",
"//third_party/skia/include/utils",
"//third_party/skia",
"//third_party/skia/third_party/skcms",
]
if (enable_vulkan) {
Expand Down Expand Up @@ -82,10 +70,6 @@ config("skia_config") {
}

if (skia_support_gpu) {
include_dirs += [
"//third_party/skia/src/gpu",
"//third_party/skia/src/sksl",
]
workaround_header = "gpu/config/gpu_driver_bug_workaround_autogen.h"
defines += [
"SK_SUPPORT_GPU=1",
Expand Down Expand Up @@ -116,47 +100,12 @@ config("skia_config") {
if (skia_whitelist_serialized_typefaces) {
defines += [ "SK_WHITELIST_SERIALIZED_TYPEFACES" ]
}

if (skia_support_skottie) {
include_dirs += [ "//third_party/skia/modules/skottie/include" ]
}
}

# Internal-facing config for Skia library code.
config("skia_library_config") {
defines = [ "SK_IGNORE_LINEAR_METRICS_FIX" ]

# These include directories are only included for Skia code and are not
# exported to dependents.
include_dirs = [
"//third_party/skia/include/codec",
"//third_party/skia/include/private",
"//third_party/skia/include/client/android",
"//third_party/skia/src/codec",
"//third_party/skia/src/core",
"//third_party/skia/src/image",
"//third_party/skia/src/images",
"//third_party/skia/src/opts",
"//third_party/skia/src/pdf",
"//third_party/skia/src/ports",
"//third_party/skia/src/shaders",
"//third_party/skia/src/shaders/gradients",
"//third_party/skia/src/sfnt",
"//third_party/skia/src/utils",
"//third_party/skia/src/lazy",
"//third_party/skia/third_party/gif",
]

if (is_mac || is_ios) {
include_dirs += [ "//third_party/skia/include/utils/mac" ]
}
if (is_mac) {
include_dirs += [ "//third_party/skia/include/utils/ios" ]
}

# TODO: remove after Skia shader relocation (https://skia-review.googlesource.com/c/17927)
include_dirs += [ "//third_party/skia/src/effects/gradients" ]

if (!is_ios && !use_system_freetype) {
defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x01000000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ]
}
Expand Down Expand Up @@ -207,11 +156,6 @@ config("skia_library_config") {
}

if (is_win) {
include_dirs += [
"//third_party/skia/include/utils/win",
"//third_party/skia/src/utils/win",
]

defines += [
# On windows, GDI handles are a scarse system-wide resource so we have to
# keep the glyph cache, which holds up to 4 GDI handles per entry, to a
Expand All @@ -232,13 +176,6 @@ config("skia_library_config") {
"/wd4800", # forcing value to bool 'true/false'(assigning int to bool).
]
}

if (skia_support_skottie) {
include_dirs += [
"//third_party/skia/modules/sksg/include",
"//third_party/skia/modules/skshaper/include",
]
}
}

source_set("skcms") {
Expand Down
4 changes: 2 additions & 2 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
// ===== Begin Chrome-specific definitions =====

#ifdef SK_DEBUG
#define SK_REF_CNT_MIXIN_INCLUDE "sk_ref_cnt_ext_debug.h"
#define SK_REF_CNT_MIXIN_INCLUDE "skia/config/sk_ref_cnt_ext_debug.h"
#else
#define SK_REF_CNT_MIXIN_INCLUDE "sk_ref_cnt_ext_release.h"
#define SK_REF_CNT_MIXIN_INCLUDE "skia/config/sk_ref_cnt_ext_release.h"
#endif

#define SK_MSCALAR_IS_FLOAT
Expand Down
2 changes: 1 addition & 1 deletion skia/ext/event_tracer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef SKIA_EXT_TRACE_EVENT_H_
#define SKIA_EXT_TRACE_EVENT_H_

#include "SkPreConfig.h"
#include "include/core/SkTypes.h"

SK_API void InitSkiaEventTracer();

Expand Down
6 changes: 3 additions & 3 deletions third_party/blink/public/platform/web_font_render_style.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_FONT_RENDER_STYLE_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_FONT_RENDER_STYLE_H_

#include "SkFontStyle.h"
#include "SkFontTypes.h"
#include "SkPaint.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/skia/include/core/SkFontStyle.h"
#include "third_party/skia/include/core/SkFontTypes.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkRefCnt.h"

class SkFont;
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/public/platform/web_image_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_IMAGE_GENERATOR_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_IMAGE_GENERATOR_H_

#include "SkRefCnt.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/skia/include/core/SkRefCnt.h"

class SkData;
class SkImageGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "third_party/blink/renderer/core/imagebitmap/image_bitmap.h"

#include "SkPixelRef.h" // FIXME: qualify this skia header file.

#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand All @@ -58,6 +56,7 @@
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPixelRef.h"
#include "third_party/skia/include/core/SkSurface.h"

namespace blink {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

#include "third_party/blink/renderer/modules/accessibility/ax_image_map_link.h"

#include "SkMatrix44.h"
#include "third_party/blink/renderer/core/aom/accessible_node.h"
#include "third_party/blink/renderer/core/dom/element_traversal.h"
#include "third_party/blink/renderer/modules/accessibility/ax_layout_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"
#include "third_party/blink/renderer/platform/graphics/path.h"
#include "third_party/skia/include/core/SkMatrix44.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

#include "third_party/blink/renderer/modules/accessibility/ax_menu_list_option.h"

#include "SkMatrix44.h"
#include "third_party/blink/renderer/core/aom/accessible_node.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/modules/accessibility/ax_menu_list.h"
#include "third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"
#include "third_party/skia/include/core/SkMatrix44.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include "third_party/blink/renderer/modules/accessibility/ax_object.h"

#include "SkMatrix44.h"
#include "third_party/blink/public/platform/web_scroll_into_view_params.h"
#include "third_party/blink/renderer/core/aom/accessible_node.h"
#include "third_party/blink/renderer/core/aom/accessible_node_list.h"
Expand Down Expand Up @@ -64,6 +63,7 @@
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "third_party/skia/include/core/SkMatrix44.h"

using blink::WebLocalizedString;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

#include "third_party/blink/renderer/modules/accessibility/ax_validation_message.h"

#include "SkMatrix44.h"
#include "third_party/blink/renderer/core/html/forms/listed_element.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/skia/include/core/SkMatrix44.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include "third_party/blink/public/web/web_ax_object.h"

#include "SkMatrix44.h"
#include "third_party/blink/public/platform/web_float_rect.h"
#include "third_party/blink/public/platform/web_point.h"
#include "third_party/blink/public/platform/web_rect.h"
Expand Down Expand Up @@ -61,6 +60,7 @@
#include "third_party/blink/renderer/modules/accessibility/ax_range.h"
#include "third_party/blink/renderer/modules/accessibility/ax_selection.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/skia/include/core/SkMatrix44.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/fonts/bitmap_glyphs_block_list.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"

#include "SkTypeface.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"
#include "third_party/skia/include/core/SkTypeface.h"

namespace blink {

Expand Down
6 changes: 3 additions & 3 deletions third_party/blink/renderer/platform/fonts/font_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FONT_DESCRIPTION_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_FONT_DESCRIPTION_H_

#include "SkFontStyle.h"
#include <unicode/uscript.h>

#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/platform/font_family_names.h"
#include "third_party/blink/renderer/platform/fonts/font_cache_key.h"
Expand All @@ -43,8 +44,7 @@
#include "third_party/blink/renderer/platform/text/layout_locale.h"
#include "third_party/blink/renderer/platform/wtf/allocator.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"

#include <unicode/uscript.h>
#include "third_party/skia/include/core/SkFontStyle.h"

namespace blink {

Expand Down
7 changes: 3 additions & 4 deletions third_party/blink/renderer/platform/fonts/font_metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
#include "build/build_config.h"
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
#include "third_party/blink/renderer/platform/fonts/vdmx_parser.h"

#include <SkFont.h>
#include <SkFontMetrics.h>
#include <SkTypeface.h>
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkFontMetrics.h"
#include "third_party/skia/include/core/SkTypeface.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"

#include "SkFont.h"
#include "SkTypeface.h"
#include "build/build_config.h"
#include "hb-ot.h"
#include "hb.h"
Expand All @@ -35,6 +33,8 @@
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
#include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/skia/include/core/SkFont.h"
#include "third_party/skia/include/core/SkTypeface.h"

#if defined(OS_MACOSX)
#include "third_party/skia/include/ports/SkTypeface_mac.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#include "build/build_config.h"
#include "third_party/blink/renderer/platform/wtf/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkTypeface.h"

#if defined(OS_ANDROID) || defined(OS_WIN)
#include "third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h"
#endif

#include <SkRefCnt.h>
#include <SkTypeface.h>
#include <memory>

namespace blink {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "third_party/blink/renderer/platform/fonts/opentype/font_format_check.h"

#include "SkTypeface.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/skia/include/core/SkTypeface.h"

// Include HarfBuzz to have a cross-platform way to retrieve table tags without
// having to rely on the platform being able to instantiate this font format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

#include "third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h"

#include "SkTypeface.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_types.h"
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
#include "third_party/blink/renderer/platform/fonts/skia/skia_text_metrics.h"
#include "third_party/blink/renderer/platform/geometry/float_rect.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/skia/include/core/SkTypeface.h"

namespace blink {
namespace open_type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

#include <SkRefCnt.h>
#include <SkTypeface.h>
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkTypeface.h"

class SkFont;

Expand Down
Loading

0 comments on commit 1bc35d4

Please sign in to comment.