mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Specifying the `--enable-impeller` flag will switch the renderer to using Impeller instead of Skia. On platforms where Impeller is not supported, this flag is ignored. The notion of the `flutter::SurfaceFrame` has been augmented. Now, in the absence of a Skia surface to render to, the surface frame will render into a display list instead. Impeller variants of the context and surface variants have been added to `shell/gpu` and `shell/platform`. The variants prepare surface frames that don’t/can’t specify a Skia surface thus forcing the surface frame to render to a display list instead. Then, in the submit callback, they forward the display list ops to the Impeller display list dispatcher. This scheme has been chosen as it requires the fewest updates to engine internals which all depend on Skia data structures. Instead of updating all call-sites to be Skia neutral, the display list interface itself is being made graphics package agnostic.
64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
# Copyright 2013 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import("//flutter/common/config.gni")
|
|
import("//flutter/shell/config.gni")
|
|
|
|
gpu_common_deps = [
|
|
"//flutter/common",
|
|
"//flutter/common/graphics",
|
|
"//flutter/flow",
|
|
"//flutter/fml",
|
|
"//flutter/shell/common",
|
|
"//third_party/skia",
|
|
]
|
|
|
|
source_set("gpu_surface_software") {
|
|
sources = [
|
|
"gpu_surface_software.cc",
|
|
"gpu_surface_software.h",
|
|
"gpu_surface_software_delegate.cc",
|
|
"gpu_surface_software_delegate.h",
|
|
]
|
|
|
|
public_deps = gpu_common_deps
|
|
}
|
|
|
|
source_set("gpu_surface_gl") {
|
|
sources = [
|
|
"gpu_surface_gl.cc",
|
|
"gpu_surface_gl.h",
|
|
"gpu_surface_gl_delegate.cc",
|
|
"gpu_surface_gl_delegate.h",
|
|
]
|
|
|
|
public_deps = gpu_common_deps
|
|
}
|
|
|
|
source_set("gpu_surface_vulkan") {
|
|
sources = [
|
|
"gpu_surface_vulkan.cc",
|
|
"gpu_surface_vulkan.h",
|
|
"gpu_surface_vulkan_delegate.cc",
|
|
"gpu_surface_vulkan_delegate.h",
|
|
]
|
|
public_deps = gpu_common_deps + [
|
|
"//flutter/shell/platform/embedder:embedder_headers",
|
|
"//flutter/vulkan",
|
|
]
|
|
}
|
|
|
|
source_set("gpu_surface_metal") {
|
|
sources = [
|
|
"gpu_surface_metal_delegate.cc",
|
|
"gpu_surface_metal_delegate.h",
|
|
"gpu_surface_metal_impeller.h",
|
|
"gpu_surface_metal_impeller.mm",
|
|
"gpu_surface_metal_skia.h",
|
|
"gpu_surface_metal_skia.mm",
|
|
]
|
|
|
|
public_deps = gpu_common_deps + [ "//flutter/impeller" ]
|
|
}
|