Flutter Engine
The Flutter Engine
embedder_test_context_software.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_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_SOFTWARE_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_SOFTWARE_H_
7
8#include "flutter/shell/platform/embedder/tests/embedder_test_context.h"
9
11
12namespace flutter {
13namespace testing {
14
16 public:
17 explicit EmbedderTestContextSoftware(std::string assets_path = "");
18
20
21 size_t GetSurfacePresentCount() const override;
22
23 // |EmbedderTestContext|
25
26 bool Present(const sk_sp<SkImage>& image);
27
28 protected:
29 virtual void SetupCompositor() override;
30
31 private:
32 sk_sp<SkSurface> surface_;
33 SkISize surface_size_;
34 size_t software_surface_present_count_ = 0;
35 void SetupSurface(SkISize surface_size) override;
36
37 FML_DISALLOW_COPY_AND_ASSIGN(EmbedderTestContextSoftware);
38};
39
40} // namespace testing
41} // namespace flutter
42
43#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_SOFTWARE_H_
EmbedderTestContextType GetContextType() const override
sk_sp< const SkImage > image
Definition: SkRecords.h:269
Definition: SkSize.h:16