Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
embedder_test_context_software.cc
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#include "flutter/shell/platform/embedder/tests/embedder_test_context_software.h"
6
7#include <utility>
8
9#include "flutter/fml/make_copyable.h"
10#include "flutter/fml/paths.h"
11#include "flutter/runtime/dart_vm.h"
12#include "flutter/shell/platform/embedder/tests/embedder_assertions.h"
13#include "flutter/shell/platform/embedder/tests/embedder_test_compositor_software.h"
14#include "flutter/testing/testing.h"
15#include "third_party/dart/runtime/bin/elf_loader.h"
17
18namespace flutter {
19namespace testing {
20
22 std::string assets_path)
23 : EmbedderTestContext(std::move(assets_path)) {}
24
26
28 software_surface_present_count_++;
29
31
32 return true;
33}
34
36 return software_surface_present_count_;
37}
38
42
44 surface_size_ = surface_size;
45}
46
48 FML_CHECK(!compositor_) << "Already set up a compositor in this context.";
49 compositor_ = std::make_unique<EmbedderTestCompositorSoftware>(surface_size_);
50}
51
52} // namespace testing
53} // namespace flutter
EmbedderTestContextType GetContextType() const override
std::unique_ptr< EmbedderTestCompositor > compositor_
void FireRootSurfacePresentCallbackIfPresent(const std::function< sk_sp< SkImage >(void)> &image_callback)
sk_sp< SkImage > image
Definition examples.cpp:29
#define FML_CHECK(condition)
Definition logging.h:85
Definition ref_ptr.h:256