Skip to content

Commit

Permalink
Revert "Skia/Metal raster: Add viz::MetalContextProvider"
Browse files Browse the repository at this point in the history
This reverts commit 45f012f.

Reason for revert: Broke mac compile

Original change's description:
> Skia/Metal raster: Add viz::MetalContextProvider
> 
> Add viz::MetalContextProvider, and add Metal to the Skia build by
> default. Do not wire up any of this yet.
> 
> Bug: 952063
> Change-Id: I897d052bdbf046114c1ddc0527c1d3cafc8777c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577296
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Eric Karl <ericrk@chromium.org>
> Commit-Queue: ccameron <ccameron@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#652899}

TBR=ccameron@chromium.org,brianosman@google.com,ericrk@chromium.org

Change-Id: Ic0a4f5201df55ac7ef0b8a191b572a9bbeee6dc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 952063
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577783
Reviewed-by: ccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652909}
  • Loading branch information
ccameron-chromium authored and Commit Bot committed Apr 22, 2019
1 parent 37b1819 commit 338a355
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 162 deletions.
31 changes: 0 additions & 31 deletions components/viz/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,6 @@ viz_component("resource_format_utils") {
]
}

if (is_mac) {
viz_component("metal_context_provider") {
output_name = "viz_metal_context_provider"

defines = [ "VIZ_METAL_CONTEXT_PROVIDER_IMPLEMENTATION" ]

sources = [
"gpu/metal_context_provider.h",
"gpu/metal_context_provider.mm",
"viz_metal_context_provider_export.h",
]

public_deps = [
"//skia",
]

deps = [
"//base",
"//ui/gfx",
]

libs = [
"Metal.framework",
"Foundation.framework",
]
}
}

if (enable_vulkan) {
viz_component("vulkan_context_provider") {
output_name = "viz_vulkan_context_provider"
Expand Down Expand Up @@ -284,9 +256,6 @@ viz_component("common") {
if (enable_vulkan) {
public_deps += [ ":vulkan_context_provider" ]
}
if (is_mac) {
public_deps += [ ":metal_context_provider" ]
}
}

viz_source_set("unit_tests") {
Expand Down
29 changes: 0 additions & 29 deletions components/viz/common/gpu/metal_context_provider.h

This file was deleted.

65 changes: 0 additions & 65 deletions components/viz/common/gpu/metal_context_provider.mm

This file was deleted.

29 changes: 0 additions & 29 deletions components/viz/common/viz_metal_context_provider_export.h

This file was deleted.

20 changes: 12 additions & 8 deletions skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ skia_support_skottie = true

declare_args() {
skia_whitelist_serialized_typefaces = false
skia_use_metal = false
}

# External-facing config for dependent code.
Expand Down Expand Up @@ -101,10 +102,7 @@ config("skia_config") {
}

if (is_mac) {
defines += [
"SK_BUILD_FOR_MAC",
"SK_METAL",
]
defines += [ "SK_BUILD_FOR_MAC" ]
}

if (is_win) {
Expand Down Expand Up @@ -558,14 +556,20 @@ component("skia") {
}

if (is_mac) {
deps += [ ":skia_metal" ]
defines += [ "SK_METAL" ]
if (skia_use_metal) {
deps += [ ":skia_metal" ]
defines += [ "SK_METAL" ]
libs += [
"Metal.framework",
"Foundation.framework",
]
}

libs = [
"AppKit.framework",
"CoreFoundation.framework",
"CoreGraphics.framework",
"CoreText.framework",
"Metal.framework",
"Foundation.framework",
]
}
Expand Down Expand Up @@ -797,7 +801,7 @@ skia_source_set("skia_opts") {
}

# Split out metal sources, because they require ARC.
if (is_mac) {
if (is_mac && skia_use_metal) {
skia_source_set("skia_metal") {
defines = [ "SK_METAL" ]
sources = skia_metal_sources
Expand Down

0 comments on commit 338a355

Please sign in to comment.