未验证 提交 228cecc2 编写于 作者: C Chinmay Garde 提交者: GitHub

Make //flutter/synchronization Garnet free. (#5865)

上级 336c23f8
......@@ -16,7 +16,6 @@ source_set("assets") {
deps = [
"$flutter_root/common",
"$flutter_root/fml",
"//garnet/public/lib/fxl",
]
public_deps = [
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "flutter/assets/zip_asset_store.h"
#include "lib/fxl/build_config.h"
#include "flutter/fml/build_config.h"
#include <fcntl.h>
......@@ -58,13 +58,13 @@ std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
result = unzGoToFilePos(unzipper.get(), &(found->second.file_pos));
if (result != UNZ_OK) {
FXL_LOG(WARNING) << "unzGetCurrentFileInfo failed, error=" << result;
FML_LOG(WARNING) << "unzGetCurrentFileInfo failed, error=" << result;
return nullptr;
}
result = unzOpenCurrentFile(unzipper.get());
if (result != UNZ_OK) {
FXL_LOG(WARNING) << "unzOpenCurrentFile failed, error=" << result;
FML_LOG(WARNING) << "unzOpenCurrentFile failed, error=" << result;
return nullptr;
}
......
......@@ -8,8 +8,7 @@
#include <map>
#include "flutter/assets/asset_resolver.h"
#include "lib/fxl/macros.h"
#include "lib/fxl/memory/ref_counted.h"
#include "flutter/fml/macros.h"
#include "third_party/zlib/contrib/minizip/unzip.h"
namespace blink {
......@@ -50,7 +49,7 @@ class ZipAssetStore final : public AssetResolver {
UniqueUnzipper CreateUnzipper() const;
FXL_DISALLOW_COPY_AND_ASSIGN(ZipAssetStore);
FML_DISALLOW_COPY_AND_ASSIGN(ZipAssetStore);
};
} // namespace blink
......
......@@ -18,7 +18,7 @@ Animator::Animator(Delegate& delegate,
waiter_(std::move(waiter)),
last_begin_frame_time_(),
dart_frame_deadline_(0),
layer_tree_pipeline_(fxl::MakeRefCounted<LayerTreePipeline>(2)),
layer_tree_pipeline_(fml::MakeRefCounted<LayerTreePipeline>(2)),
pending_frame_semaphore_(1),
frame_number_(1),
paused_(false),
......
......@@ -28,7 +28,7 @@ class Animator final {
virtual void OnAnimatorDraw(
const Animator& animator,
fxl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) = 0;
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) = 0;
virtual void OnAnimatorDrawLastLayerTree(const Animator& animator) = 0;
};
......@@ -68,7 +68,7 @@ class Animator final {
fxl::TimePoint last_begin_frame_time_;
int64_t dart_frame_deadline_;
fxl::RefPtr<LayerTreePipeline> layer_tree_pipeline_;
fml::RefPtr<LayerTreePipeline> layer_tree_pipeline_;
flutter::Semaphore pending_frame_semaphore_;
LayerTreePipeline::ProducerContinuation producer_continuation_;
int64_t frame_number_;
......
......@@ -61,7 +61,7 @@ void Rasterizer::DrawLastLayerTree() {
}
void Rasterizer::Draw(
fxl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) {
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) {
TRACE_EVENT0("flutter", "GPURasterizer::Draw");
flutter::Pipeline<flow::LayerTree>::Consumer consumer =
......
......@@ -39,7 +39,7 @@ class Rasterizer final {
flow::TextureRegistry* GetTextureRegistry();
void Draw(fxl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline);
void Draw(fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline);
enum class ScreenshotType {
SkiaPicture,
......
......@@ -695,7 +695,7 @@ void Shell::OnAnimatorNotifyIdle(const Animator& animator, int64_t deadline) {
// |shell::Animator::Delegate|
void Shell::OnAnimatorDraw(
const Animator& animator,
fxl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) {
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) {
FXL_DCHECK(is_setup_);
task_runners_.GetGPUTaskRunner()->PostTask(
......
......@@ -181,7 +181,7 @@ class Shell final : public PlatformView::Delegate,
// |shell::Animator::Delegate|
void OnAnimatorDraw(
const Animator& animator,
fxl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) override;
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) override;
// |shell::Animator::Delegate|
void OnAnimatorDrawLastLayerTree(const Animator& animator) override;
......
......@@ -14,7 +14,6 @@ source_set("synchronization") {
public_deps = [
"$flutter_root/fml",
"//garnet/public/lib/fxl",
]
}
......
......@@ -5,12 +5,11 @@
#ifndef SYNCHRONIZATION_PIPELINE_H_
#define SYNCHRONIZATION_PIPELINE_H_
#include "flutter/fml/macros.h"
#include "flutter/fml/memory/ref_counted.h"
#include "flutter/fml/trace_event.h"
#include "flutter/synchronization/pipeline.h"
#include "flutter/synchronization/semaphore.h"
#include "lib/fxl/functional/closure.h"
#include "lib/fxl/macros.h"
#include "lib/fxl/memory/ref_counted.h"
#include <memory>
#include <mutex>
......@@ -27,7 +26,7 @@ enum class PipelineConsumeResult {
size_t GetNextPipelineTraceID();
template <class R>
class Pipeline : public fxl::RefCountedThreadSafe<Pipeline<R>> {
class Pipeline : public fml::RefCountedThreadSafe<Pipeline<R>> {
public:
using Resource = R;
using ResourcePtr = std::unique_ptr<Resource>;
......@@ -83,7 +82,7 @@ class Pipeline : public fxl::RefCountedThreadSafe<Pipeline<R>> {
TRACE_EVENT_ASYNC_BEGIN0("flutter", "PipelineProduce", trace_id_);
}
FXL_DISALLOW_COPY_AND_ASSIGN(ProducerContinuation);
FML_DISALLOW_COPY_AND_ASSIGN(ProducerContinuation);
};
explicit Pipeline(uint32_t depth) : empty_(depth), available_(0) {}
......@@ -105,7 +104,7 @@ class Pipeline : public fxl::RefCountedThreadSafe<Pipeline<R>> {
using Consumer = std::function<void(ResourcePtr)>;
FXL_WARN_UNUSED_RESULT
FML_WARN_UNUSED_RESULT
PipelineConsumeResult Consume(Consumer consumer) {
if (consumer == nullptr) {
return PipelineConsumeResult::NoneAvailable;
......@@ -155,7 +154,7 @@ class Pipeline : public fxl::RefCountedThreadSafe<Pipeline<R>> {
available_.Signal();
}
FXL_DISALLOW_COPY_AND_ASSIGN(Pipeline);
FML_DISALLOW_COPY_AND_ASSIGN(Pipeline);
};
} // namespace flutter
......
......@@ -4,8 +4,8 @@
#include "flutter/synchronization/semaphore.h"
#include "lib/fxl/build_config.h"
#include "lib/fxl/logging.h"
#include "flutter/fml/build_config.h"
#include "flutter/fml/logging.h"
#if OS_MACOSX
#include <dispatch/dispatch.h>
......@@ -47,7 +47,7 @@ class PlatformSemaphore {
dispatch_semaphore_t _sem;
const uint32_t _initial;
FXL_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
FML_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
};
} // namespace flutter
......@@ -88,14 +88,14 @@ class PlatformSemaphore {
private:
HANDLE _sem;
FXL_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
FML_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
};
} // namespace flutter
#else
#include <semaphore.h>
#include "lib/fxl/files/eintr_wrapper.h"
#include "flutter/fml/eintr_wrapper.h"
namespace flutter {
......@@ -109,7 +109,7 @@ class PlatformSemaphore {
int result = ::sem_destroy(&sem_);
// Can only be EINVAL which should not be possible since we checked for
// validity.
FXL_DCHECK(result == 0);
FML_DCHECK(result == 0);
}
}
......@@ -120,7 +120,7 @@ class PlatformSemaphore {
return false;
}
return HANDLE_EINTR(::sem_trywait(&sem_)) == 0;
return FML_HANDLE_EINTR(::sem_trywait(&sem_)) == 0;
}
void Signal() {
......@@ -137,7 +137,7 @@ class PlatformSemaphore {
bool valid_;
sem_t sem_;
FXL_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
FML_DISALLOW_COPY_AND_ASSIGN(PlatformSemaphore);
};
} // namespace flutter
......
......@@ -7,9 +7,8 @@
#include <memory>
#include "lib/fxl/compiler_specific.h"
#include "lib/fxl/macros.h"
#include "lib/fxl/time/time_delta.h"
#include "flutter/fml/compiler_specific.h"
#include "flutter/fml/macros.h"
namespace flutter {
......@@ -23,7 +22,7 @@ class Semaphore {
bool IsValid() const;
FXL_WARN_UNUSED_RESULT
FML_WARN_UNUSED_RESULT
bool TryWait();
void Signal();
......@@ -31,7 +30,7 @@ class Semaphore {
private:
std::unique_ptr<PlatformSemaphore> _impl;
FXL_DISALLOW_COPY_AND_ASSIGN(Semaphore);
FML_DISALLOW_COPY_AND_ASSIGN(Semaphore);
};
} // namespace flutter
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册