mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
bc2acf7bdd
With the update to HEAD of the Fuchsia buildtools repo, the new clang
toolchain picked up caused link-time breakage in android x86_64
libFlutter.so builds.
Sample log:
https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio
Sample failure:
FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so
../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id
This reverts commit 8ad42f0dae.
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/shell/testing/test_runner.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include "flutter/common/threads.h"
|
|
#include "flutter/shell/common/platform_view.h"
|
|
#include "flutter/shell/common/shell.h"
|
|
#include "flutter/shell/testing/platform_view_test.h"
|
|
|
|
namespace shell {
|
|
|
|
TestRunner::TestRunner()
|
|
: platform_view_(std::make_shared<PlatformViewTest>()) {
|
|
platform_view_->Attach();
|
|
blink::ViewportMetrics metrics;
|
|
metrics.device_pixel_ratio = 3.0;
|
|
metrics.physical_width = 2400; // 800 at 3x resolution
|
|
metrics.physical_height = 1800; // 600 at 3x resolution
|
|
|
|
blink::Threads::UI()->PostTask(
|
|
[ engine = platform_view_->engine().GetWeakPtr(), metrics ] {
|
|
if (engine)
|
|
engine->SetViewportMetrics(metrics);
|
|
});
|
|
}
|
|
|
|
TestRunner::~TestRunner() = default;
|
|
|
|
TestRunner& TestRunner::Shared() {
|
|
static TestRunner* g_test_runner = nullptr;
|
|
if (!g_test_runner)
|
|
g_test_runner = new TestRunner();
|
|
return *g_test_runner;
|
|
}
|
|
|
|
void TestRunner::Run(const TestDescriptor& test) {
|
|
blink::Threads::UI()->PostTask(
|
|
[ engine = platform_view_->engine().GetWeakPtr(), test ] {
|
|
if (engine)
|
|
engine->RunBundleAndSource(std::string(), test.path, test.packages);
|
|
});
|
|
}
|
|
|
|
} // namespace shell
|