Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
dl_test_surface_provider_skia_metal.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_DISPLAY_LIST_TESTING_SKIA_DL_TEST_SURFACE_PROVIDER_SKIA_METAL_H_
6#define FLUTTER_DISPLAY_LIST_TESTING_SKIA_DL_TEST_SURFACE_PROVIDER_SKIA_METAL_H_
7
9
12
13namespace flutter {
14namespace testing {
15
17 public:
19 virtual ~DlSurfaceProviderSkiaMetal() = default;
20
21 bool InitializeSurface(size_t width,
22 size_t height,
23 PixelFormat format) override;
24 std::shared_ptr<DlSurfaceInstance> GetPrimarySurface() const override;
25 std::unique_ptr<DlSurfaceInstance> MakeOffscreenSurface(
26 size_t width,
27 size_t height,
28 PixelFormat format) const override;
29 const std::string GetBackendName() const override { return "SkiaMetal"; }
30 BackendType GetBackendType() const override {
31 return BackendType::kSkiaMetal;
32 }
33 bool SupportsPixelFormat(PixelFormat format) const override {
34 return format == kN32Premul;
35 }
36 bool TargetsImpeller() const override { return false; }
37
38 private:
39 // This must be placed before any other members that may use the
40 // autorelease pool.
41 fml::ScopedNSAutoreleasePool autorelease_pool_;
42
43 std::unique_ptr<TestMetalContext> metal_context_;
44 std::shared_ptr<DlSurfaceInstance> metal_surface_;
45};
46
47} // namespace testing
48} // namespace flutter
49
50#endif // FLUTTER_DISPLAY_LIST_TESTING_SKIA_DL_TEST_SURFACE_PROVIDER_SKIA_METAL_H_
std::unique_ptr< DlSurfaceInstance > MakeOffscreenSurface(size_t width, size_t height, PixelFormat format) const override
bool SupportsPixelFormat(PixelFormat format) const override
bool InitializeSurface(size_t width, size_t height, PixelFormat format) override
std::shared_ptr< DlSurfaceInstance > GetPrimarySurface() const override
uint32_t uint32_t * format
int32_t height
int32_t width