Flutter Engine
 
Loading...
Searching...
No Matches
dl_test_surface_gl.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_DL_TEST_SURFACE_GL_H_
6#define FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_SURFACE_GL_H_
7
9
11
12namespace flutter {
13namespace testing {
14
16 public:
18 virtual ~DlOpenGLSurfaceProvider() = default;
19
20 bool InitializeSurface(size_t width,
21 size_t height,
22 PixelFormat format) override;
23 std::shared_ptr<DlSurfaceInstance> GetPrimarySurface() const override;
24 std::shared_ptr<DlSurfaceInstance> MakeOffscreenSurface(
25 size_t width,
26 size_t height,
27 PixelFormat format) const override;
28 const std::string backend_name() const override { return "OpenGL"; }
29 BackendType backend_type() const override { return kOpenGlBackend; }
30 bool supports(PixelFormat format) const override {
32 }
33
34 private:
35 std::shared_ptr<DlSurfaceInstance> primary_;
36 std::unique_ptr<TestGLSurface> gl_surface_;
37};
38
39} // namespace testing
40} // namespace flutter
41
42#endif // FLUTTER_DISPLAY_LIST_TESTING_DL_TEST_SURFACE_GL_H_
std::shared_ptr< DlSurfaceInstance > GetPrimarySurface() const override
BackendType backend_type() const override
bool InitializeSurface(size_t width, size_t height, PixelFormat format) override
bool supports(PixelFormat format) const override
std::shared_ptr< DlSurfaceInstance > MakeOffscreenSurface(size_t width, size_t height, PixelFormat format) const override
const std::string backend_name() const override
uint32_t uint32_t * format
int32_t height
int32_t width