7#include "third_party/skia/include/encode/SkPngEncoder.h"
8#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
27 return CreateSoftware();
29 return CreateOpenGL();
36#ifdef BENCHMARKS_NO_SNAPSHOT
43 auto raster =
image->makeRasterImage(
nullptr);
47 auto data = SkPngEncoder::Encode(
nullptr, raster.get(), {});
57#ifndef ENABLE_SOFTWARE_BENCHMARKS
58std::unique_ptr<DlSurfaceProvider> DlSurfaceProvider::CreateSoftware() {
62#ifndef ENABLE_OPENGL_BENCHMARKS
63std::unique_ptr<DlSurfaceProvider> DlSurfaceProvider::CreateOpenGL() {
67#ifndef ENABLE_METAL_BENCHMARKS
68std::unique_ptr<DlSurfaceProvider> DlSurfaceProvider::CreateMetal() {
78 if (GrDirectContext* dContext =
79 GrAsDirectContext(
surface->recordingContext())) {
80 dContext->flushAndSubmit(
surface.get(), GrSyncCpu::kYes);
virtual sk_sp< SkSurface > sk_surface() const =0
void FlushSubmitCpuSync()
virtual std::shared_ptr< DlSurfaceInstance > GetPrimarySurface() const =0
virtual bool Snapshot(std::string &filename) const
static std::string BackendName(BackendType type)
static std::unique_ptr< DlSurfaceProvider > Create(BackendType backend_type)
virtual BackendType backend_type() const =0
FlutterVulkanImage * image
fml::UniqueFD OpenFixturesDirectory()
Opens the fixtures directory for the unit-test harness.
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data