Rename the blink namespace to flutter. (flutter/engine#8517)

Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
This commit is contained in:
Chinmay Garde
2019-04-09 12:44:42 -07:00
committed by GitHub
parent df50f7dee4
commit 1fd28a143a
211 changed files with 933 additions and 916 deletions

View File

@@ -7,7 +7,7 @@
#include "flutter/assets/directory_asset_bundle.h"
#include "flutter/fml/trace_event.h"
namespace blink {
namespace flutter {
AssetManager::AssetManager() = default;
@@ -29,7 +29,7 @@ void AssetManager::PushBack(std::unique_ptr<AssetResolver> resolver) {
resolvers_.push_back(std::move(resolver));
}
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
const std::string& asset_name) const {
if (asset_name.size() == 0) {
@@ -47,9 +47,9 @@ std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
return nullptr;
}
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool AssetManager::IsValid() const {
return resolvers_.size() > 0;
}
} // namespace blink
} // namespace flutter

View File

@@ -13,7 +13,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/memory/ref_counted.h"
namespace blink {
namespace flutter {
class AssetManager final : public AssetResolver {
public:
@@ -25,10 +25,10 @@ class AssetManager final : public AssetResolver {
void PushBack(std::unique_ptr<AssetResolver> resolver);
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;
@@ -38,6 +38,6 @@ class AssetManager final : public AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(AssetManager);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_ASSETS_ASSET_MANAGER_H_

View File

@@ -11,7 +11,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/mapping.h"
namespace blink {
namespace flutter {
class AssetResolver {
public:
@@ -29,6 +29,6 @@ class AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(AssetResolver);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_ASSETS_ASSET_RESOLVER_H_

View File

@@ -10,7 +10,7 @@
#include "flutter/fml/file.h"
#include "flutter/fml/mapping.h"
namespace blink {
namespace flutter {
DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)
: descriptor_(std::move(descriptor)) {
@@ -22,12 +22,12 @@ DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)
DirectoryAssetBundle::~DirectoryAssetBundle() = default;
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool DirectoryAssetBundle::IsValid() const {
return is_valid_;
}
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
const std::string& asset_name) const {
if (!is_valid_) {
@@ -45,4 +45,4 @@ std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
return mapping;
}
} // namespace blink
} // namespace flutter

View File

@@ -10,7 +10,7 @@
#include "flutter/fml/memory/ref_counted.h"
#include "flutter/fml/unique_fd.h"
namespace blink {
namespace flutter {
class DirectoryAssetBundle : public AssetResolver {
public:
@@ -22,16 +22,16 @@ class DirectoryAssetBundle : public AssetResolver {
const fml::UniqueFD descriptor_;
bool is_valid_ = false;
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;
FML_DISALLOW_COPY_AND_ASSIGN(DirectoryAssetBundle);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_ASSETS_DIRECTORY_ASSET_BUNDLE_H_

View File

@@ -16,7 +16,7 @@
#include "flutter/fml/trace_event.h"
namespace blink {
namespace flutter {
void UniqueUnzipperTraits::Free(void* file) {
unzClose(file);
@@ -33,12 +33,12 @@ UniqueUnzipper ZipAssetStore::CreateUnzipper() const {
return UniqueUnzipper{::unzOpen2(file_path_.c_str(), nullptr)};
}
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool ZipAssetStore::IsValid() const {
return stat_cache_.size() > 0;
}
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
const std::string& asset_name) const {
TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
@@ -126,4 +126,4 @@ void ZipAssetStore::BuildStatCache() {
} while (unzGoToNextFile(unzipper.get()) == UNZ_OK);
}
} // namespace blink
} // namespace flutter

View File

@@ -11,7 +11,7 @@
#include "flutter/fml/macros.h"
#include "third_party/zlib/contrib/minizip/unzip.h"
namespace blink {
namespace flutter {
struct UniqueUnzipperTraits {
static inline void* InvalidValue() { return nullptr; }
@@ -40,10 +40,10 @@ class ZipAssetStore final : public AssetResolver {
mutable std::map<std::string, CacheEntry> stat_cache_;
// |blink::AssetResolver|
// |flutter::AssetResolver|
bool IsValid() const override;
// |blink::AssetResolver|
// |flutter::AssetResolver|
std::unique_ptr<fml::Mapping> GetAsMapping(
const std::string& asset_name) const override;
@@ -54,6 +54,6 @@ class ZipAssetStore final : public AssetResolver {
FML_DISALLOW_COPY_AND_ASSIGN(ZipAssetStore);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_ASSETS_ZIP_ASSET_STORE_H_

View File

@@ -6,7 +6,7 @@
#include <sstream>
namespace blink {
namespace flutter {
Settings::Settings() = default;
@@ -54,4 +54,4 @@ std::string Settings::ToString() const {
return stream.str();
}
} // namespace blink
} // namespace flutter

View File

@@ -16,7 +16,7 @@
#include "flutter/fml/mapping.h"
#include "flutter/fml/unique_fd.h"
namespace blink {
namespace flutter {
using TaskObserverAdd =
std::function<void(intptr_t /* key */, fml::closure /* callback */)>;
@@ -145,6 +145,6 @@ struct Settings {
std::string ToString() const;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_COMMON_SETTINGS_H_

View File

@@ -6,7 +6,7 @@
#include <utility>
namespace blink {
namespace flutter {
TaskRunners::TaskRunners(std::string label,
fml::RefPtr<fml::TaskRunner> platform,
@@ -47,4 +47,4 @@ bool TaskRunners::IsValid() const {
return platform_ && gpu_ && ui_ && io_;
}
} // namespace blink
} // namespace flutter

View File

@@ -10,7 +10,7 @@
#include "flutter/fml/macros.h"
#include "flutter/fml/task_runner.h"
namespace blink {
namespace flutter {
class TaskRunners {
public:
@@ -44,6 +44,6 @@ class TaskRunners {
fml::RefPtr<fml::TaskRunner> io_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_COMMON_TASK_RUNNERS_H_

View File

@@ -4,7 +4,7 @@
#include "flutter/common/version/version.h"
namespace blink {
namespace flutter {
const char* GetFlutterEngineVersion() {
return FLUTTER_ENGINE_VERSION;
@@ -18,4 +18,4 @@ const char* GetDartVersion() {
return DART_VERSION;
}
} // namespace blink
} // namespace flutter

View File

@@ -5,7 +5,7 @@
#ifndef FLUTTER_COMMON_VERSION_VERSION_H_
#define FLUTTER_COMMON_VERSION_VERSION_H_
namespace blink {
namespace flutter {
const char* GetFlutterEngineVersion();
@@ -13,6 +13,6 @@ const char* GetSkiaVersion();
const char* GetDartVersion();
} // namespace blink
} // namespace flutter
#endif // FLUTTER_COMMON_VERSION_VERSION_H_

View File

@@ -10,7 +10,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
void DartIO::InitForIsolate() {
Dart_Handle result = Dart_SetNativeResolver(
@@ -25,4 +25,4 @@ bool DartIO::EntropySource(uint8_t* buffer, intptr_t length) {
return dart::bin::GetEntropy(buffer, length);
}
} // namespace blink
} // namespace flutter

View File

@@ -9,7 +9,7 @@
#include "flutter/fml/macros.h"
namespace blink {
namespace flutter {
class DartIO {
public:
@@ -20,6 +20,6 @@ class DartIO {
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartIO);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_IO_DART_IO_H_

View File

@@ -14,7 +14,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, Scene);
@@ -72,4 +72,4 @@ std::unique_ptr<flow::LayerTree> Scene::takeLayerTree() {
return std::move(m_layerTree);
}
} // namespace blink
} // namespace flutter

View File

@@ -16,7 +16,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Scene : public RefCountedDartWrappable<Scene> {
DEFINE_WRAPPERTYPEINFO();
@@ -48,6 +48,6 @@ class Scene : public RefCountedDartWrappable<Scene> {
std::unique_ptr<flow::LayerTree> m_layerTree;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_H_

View File

@@ -35,7 +35,7 @@
#include "flutter/flow/layers/child_scene_layer.h"
#endif
namespace blink {
namespace flutter {
static void SceneBuilder_constructor(Dart_NativeArguments args) {
DartCallConstructor(&SceneBuilder::create, args);
@@ -327,4 +327,4 @@ void SceneBuilder::PushLayer(std::shared_ptr<flow::ContainerLayer> layer) {
current_layer_ = newLayer;
}
} // namespace blink
} // namespace flutter

View File

@@ -24,7 +24,7 @@
#include "flutter/lib/ui/compositing/scene_host.h"
#endif
namespace blink {
namespace flutter {
class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
DEFINE_WRAPPERTYPEINFO();
@@ -120,6 +120,6 @@ class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
FML_DISALLOW_COPY_AND_ASSIGN(SceneBuilder);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_BUILDER_H_

View File

@@ -18,14 +18,14 @@
namespace {
using SceneHostBindings = std::unordered_map<zx_koid_t, blink::SceneHost*>;
using SceneHostBindings = std::unordered_map<zx_koid_t, flutter::SceneHost*>;
FML_THREAD_LOCAL fml::ThreadLocal tls_scene_host_bindings([](intptr_t value) {
delete reinterpret_cast<SceneHostBindings*>(value);
});
void SceneHost_constructor(Dart_NativeArguments args) {
tonic::DartCallConstructor(&blink::SceneHost::Create, args);
tonic::DartCallConstructor(&flutter::SceneHost::Create, args);
}
void SceneHost_constructorViewHolderToken(Dart_NativeArguments args) {
@@ -36,10 +36,10 @@ void SceneHost_constructorViewHolderToken(Dart_NativeArguments args) {
reinterpret_cast<intptr_t>(new SceneHostBindings()));
}
tonic::DartCallConstructor(&blink::SceneHost::CreateViewHolder, args);
tonic::DartCallConstructor(&flutter::SceneHost::CreateViewHolder, args);
}
blink::SceneHost* GetSceneHost(scenic::ResourceId id) {
flutter::SceneHost* GetSceneHost(scenic::ResourceId id) {
auto* bindings =
reinterpret_cast<SceneHostBindings*>(tls_scene_host_bindings.Get());
FML_DCHECK(bindings);
@@ -80,7 +80,7 @@ void InvokeDartFunction(tonic::DartPersistentValue* function, T& arg) {
} // namespace
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, SceneHost);
@@ -229,4 +229,4 @@ void SceneHost::dispose() {
ClearDartWrapper();
}
} // namespace blink
} // namespace flutter

View File

@@ -16,7 +16,7 @@
#include "flutter/fml/task_runner.h"
#include "flutter/lib/ui/dart_wrapper.h"
namespace blink {
namespace flutter {
class SceneHost : public RefCountedDartWrappable<SceneHost> {
DEFINE_WRAPPERTYPEINFO();
@@ -64,6 +64,6 @@ class SceneHost : public RefCountedDartWrappable<SceneHost> {
bool use_view_holder_ = false;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_HOST_H_

View File

@@ -41,7 +41,7 @@ using tonic::DartConverter;
using tonic::LogIfError;
using tonic::ToDart;
namespace blink {
namespace flutter {
#define REGISTER_FUNCTION(name, count) {"" #name, name, count, true},
#define DECLARE_FUNCTION(name, count) \
@@ -344,4 +344,4 @@ void GetCallbackFromHandle(Dart_NativeArguments args) {
Dart_SetReturnValue(args, DartCallbackCache::GetCallback(handle));
}
} // namespace blink
} // namespace flutter

View File

@@ -9,7 +9,7 @@
#include "third_party/dart/runtime/include/dart_api.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
class DartRuntimeHooks {
public:
@@ -20,6 +20,6 @@ class DartRuntimeHooks {
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartRuntimeHooks);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_DART_RUNTIME_HOOKS_H_

View File

@@ -38,7 +38,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
namespace {
static tonic::DartLibraryNatives* g_natives;
@@ -117,4 +117,4 @@ void DartUI::InitForIsolate(bool is_root_isolate) {
}
}
} // namespace blink
} // namespace flutter

View File

@@ -7,7 +7,7 @@
#include "flutter/fml/macros.h"
namespace blink {
namespace flutter {
class DartUI {
public:
@@ -18,6 +18,6 @@ class DartUI {
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartUI);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_DART_UI_H_

View File

@@ -8,7 +8,7 @@
#include "flutter/fml/memory/ref_counted.h"
#include "third_party/tonic/dart_wrappable.h"
namespace blink {
namespace flutter {
template <typename T>
class RefCountedDartWrappable : public fml::RefCountedThreadSafe<T>,
@@ -23,6 +23,6 @@ class RefCountedDartWrappable : public fml::RefCountedThreadSafe<T>,
}
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_DART_WRAPPER_H_

View File

@@ -9,7 +9,7 @@
#include "flutter/fml/memory/weak_ptr.h"
#include "third_party/skia/include/gpu/GrContext.h"
namespace blink {
namespace flutter {
// Interface for methods that manage access to the resource GrContext and Skia
// unref queue. Meant to be implemented by the owner of the resource GrContext,
// i.e. the shell's IOManager.
@@ -20,6 +20,6 @@ class IOManager {
virtual fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const = 0;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_IO_MANAGER_H_

View File

@@ -4,7 +4,7 @@
#include "flutter/lib/ui/isolate_name_server/isolate_name_server.h"
namespace blink {
namespace flutter {
IsolateNameServer::IsolateNameServer() {}
@@ -45,4 +45,4 @@ bool IsolateNameServer::RemoveIsolateNameMapping(const std::string& name) {
return true;
}
} // namespace blink
} // namespace flutter

View File

@@ -13,7 +13,7 @@
#include "flutter/fml/synchronization/thread_annotations.h"
#include "third_party/dart/runtime/include/dart_api.h"
namespace blink {
namespace flutter {
class IsolateNameServer {
public:
@@ -46,6 +46,6 @@ class IsolateNameServer {
FML_DISALLOW_COPY_AND_ASSIGN(IsolateNameServer);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_ISOLATE_NAME_SERVER_H_

View File

@@ -10,7 +10,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
Dart_Handle IsolateNameServerNatives::LookupPortByName(
const std::string& name) {
@@ -67,4 +67,4 @@ void IsolateNameServerNatives::RegisterNatives(
natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE_STATIC_)});
}
} // namespace blink
} // namespace flutter

View File

@@ -12,7 +12,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class IsolateNameServerNatives {
public:
@@ -23,6 +23,6 @@ class IsolateNameServerNatives {
static void RegisterNatives(tonic::DartLibraryNatives* natives);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_ISOLATE_NAME_SERVER_NATIVES_H_

View File

@@ -22,7 +22,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
static void Canvas_constructor(Dart_NativeArguments args) {
DartCallConstructor(&Canvas::Create, args);
@@ -431,4 +431,4 @@ bool Canvas::IsRecording() const {
return !!canvas_;
}
} // namespace blink
} // namespace flutter

View File

@@ -22,7 +22,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class CanvasImage;
class Canvas : public RefCountedDartWrappable<Canvas> {
@@ -181,6 +181,6 @@ class Canvas : public RefCountedDartWrappable<Canvas> {
SkCanvas* canvas_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_CANVAS_H_

View File

@@ -21,7 +21,7 @@ using tonic::DartInvoke;
using tonic::DartPersistentValue;
using tonic::ToDart;
namespace blink {
namespace flutter {
namespace {
@@ -553,4 +553,4 @@ void Codec::RegisterNatives(tonic::DartLibraryNatives* natives) {
natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)});
}
} // namespace blink
} // namespace flutter

View File

@@ -17,7 +17,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
// A handle to an SkCodec object.
//
@@ -96,6 +96,6 @@ class SingleFrameCodec : public Codec {
FML_FRIEND_REF_COUNTED_THREAD_SAFE(SingleFrameCodec);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_CODEC_H_

View File

@@ -13,7 +13,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
EngineLayer::EngineLayer(std::shared_ptr<flow::ContainerLayer> layer)
: layer_(layer) {}
@@ -33,4 +33,4 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, EngineLayer);
DART_BIND_ALL(EngineLayer, FOR_EACH_BINDING)
} // namespace blink
} // namespace flutter

View File

@@ -13,7 +13,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class EngineLayer;
@@ -41,6 +41,6 @@ class EngineLayer : public RefCountedDartWrappable<EngineLayer> {
FML_FRIEND_MAKE_REF_COUNTED(EngineLayer);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_ENGINE_LAYER_H_

View File

@@ -8,7 +8,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, FrameInfo);
@@ -27,4 +27,4 @@ void FrameInfo::RegisterNatives(tonic::DartLibraryNatives* natives) {
natives->Register({FOR_EACH_BINDING(DART_REGISTER_NATIVE)});
}
} // namespace blink
} // namespace flutter

View File

@@ -12,7 +12,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
// A single animation frame.
class FrameInfo final : public RefCountedDartWrappable<FrameInfo> {
@@ -36,6 +36,6 @@ class FrameInfo final : public RefCountedDartWrappable<FrameInfo> {
FML_FRIEND_REF_COUNTED_THREAD_SAFE(FrameInfo);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_FRAME_INFO_H_

View File

@@ -11,7 +11,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
typedef CanvasGradient
Gradient; // Because the C++ name doesn't match the Dart name.
@@ -143,4 +143,4 @@ CanvasGradient::CanvasGradient() = default;
CanvasGradient::~CanvasGradient() = default;
} // namespace blink
} // namespace flutter

View File

@@ -17,7 +17,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
// TODO: update this if/when Skia adds Decal mode skbug.com/7638
static_assert(kSkTileModeCount >= 3, "Need to update tile mode enum");
@@ -69,6 +69,6 @@ class CanvasGradient : public Shader {
CanvasGradient();
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_GRADIENT_H_

View File

@@ -10,7 +10,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
typedef CanvasImage Image;
@@ -48,4 +48,4 @@ size_t CanvasImage::GetAllocationSize() {
}
}
} // namespace blink
} // namespace flutter

View File

@@ -14,7 +14,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class CanvasImage final : public RefCountedDartWrappable<CanvasImage> {
DEFINE_WRAPPERTYPEINFO();
@@ -49,6 +49,6 @@ class CanvasImage final : public RefCountedDartWrappable<CanvasImage> {
flow::SkiaGPUObject<SkImage> image_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_H_

View File

@@ -25,7 +25,7 @@ using tonic::DartInvoke;
using tonic::DartPersistentValue;
using tonic::ToDart;
namespace blink {
namespace flutter {
namespace {
// This must be kept in sync with the enum in painting.dart
@@ -231,4 +231,4 @@ Dart_Handle EncodeImage(CanvasImage* canvas_image,
return Dart_Null();
}
} // namespace blink
} // namespace flutter

View File

@@ -7,7 +7,7 @@
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
class CanvasImage;
@@ -15,6 +15,6 @@ Dart_Handle EncodeImage(CanvasImage* canvas_image,
int format,
Dart_Handle callback_handle);
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_ENCODING_H_

View File

@@ -13,7 +13,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
static void ImageFilter_constructor(Dart_NativeArguments args) {
DartCallConstructor(&ImageFilter::Create, args);
@@ -63,4 +63,4 @@ void ImageFilter::initMatrix(const tonic::Float64List& matrix4,
nullptr);
}
} // namespace blink
} // namespace flutter

View File

@@ -11,7 +11,7 @@
#include "third_party/skia/include/core/SkImageFilter.h"
#include "third_party/tonic/typed_data/float64_list.h"
namespace blink {
namespace flutter {
class ImageFilter : public RefCountedDartWrappable<ImageFilter> {
DEFINE_WRAPPERTYPEINFO();
@@ -36,6 +36,6 @@ class ImageFilter : public RefCountedDartWrappable<ImageFilter> {
sk_sp<SkImageFilter> filter_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_FILTER_H_

View File

@@ -12,7 +12,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
static void ImageShader_constructor(Dart_NativeArguments args) {
DartCallConstructor(&ImageShader::Create, args);
@@ -51,4 +51,4 @@ ImageShader::ImageShader() = default;
ImageShader::~ImageShader() = default;
} // namespace blink
} // namespace flutter

View File

@@ -18,7 +18,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class ImageShader : public Shader {
DEFINE_WRAPPERTYPEINFO();
@@ -39,6 +39,6 @@ class ImageShader : public Shader {
ImageShader();
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_IMAGE_SHADER_H_

View File

@@ -6,7 +6,7 @@
#include "flutter/fml/logging.h"
namespace blink {
namespace flutter {
// Mappings from SkMatrix-index to input-index.
static const int kSkMatrixIndexToMatrix4Index[] = {
@@ -38,4 +38,4 @@ tonic::Float64List ToMatrix4(const SkMatrix& sk_matrix) {
return matrix4;
}
} // namespace blink
} // namespace flutter

View File

@@ -8,11 +8,11 @@
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/tonic/typed_data/float64_list.h"
namespace blink {
namespace flutter {
SkMatrix ToSkMatrix(const tonic::Float64List& matrix4);
tonic::Float64List ToMatrix4(const SkMatrix& sk_matrix);
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_MATRIX_H_

View File

@@ -13,7 +13,7 @@
#include "third_party/tonic/typed_data/dart_byte_data.h"
#include "third_party/tonic/typed_data/float32_list.h"
namespace blink {
namespace flutter {
// Indices for 32bit values.
constexpr int kIsAntiAliasIndex = 0;
@@ -202,11 +202,11 @@ Paint::Paint(Dart_Handle paint_objects, Dart_Handle paint_data) {
}
}
} // namespace blink
} // namespace flutter
namespace tonic {
blink::Paint DartConverter<blink::Paint>::FromArguments(
flutter::Paint DartConverter<flutter::Paint>::FromArguments(
Dart_NativeArguments args,
int index,
Dart_Handle& exception) {
@@ -216,14 +216,14 @@ blink::Paint DartConverter<blink::Paint>::FromArguments(
Dart_Handle paint_data = Dart_GetNativeArgument(args, index + 1);
FML_DCHECK(!LogIfError(paint_data));
return blink::Paint(paint_objects, paint_data);
return flutter::Paint(paint_objects, paint_data);
}
blink::PaintData DartConverter<blink::PaintData>::FromArguments(
flutter::PaintData DartConverter<flutter::PaintData>::FromArguments(
Dart_NativeArguments args,
int index,
Dart_Handle& exception) {
return blink::PaintData();
return flutter::PaintData();
}
} // namespace tonic

View File

@@ -8,7 +8,7 @@
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/tonic/converter/dart_converter.h"
namespace blink {
namespace flutter {
class Paint {
public:
@@ -30,22 +30,22 @@ class Paint {
// data for a Paint object).
class PaintData {};
} // namespace blink
} // namespace flutter
namespace tonic {
template <>
struct DartConverter<blink::Paint> {
static blink::Paint FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
struct DartConverter<flutter::Paint> {
static flutter::Paint FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
};
template <>
struct DartConverter<blink::PaintData> {
static blink::PaintData FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
struct DartConverter<flutter::PaintData> {
static flutter::PaintData FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
};
} // namespace tonic

View File

@@ -15,7 +15,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
typedef CanvasPath Path;
@@ -299,4 +299,4 @@ fml::RefPtr<CanvasPath> CanvasPath::clone() {
return path;
}
} // namespace blink
} // namespace flutter

View File

@@ -16,7 +16,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class CanvasPath : public RefCountedDartWrappable<CanvasPath> {
DEFINE_WRAPPERTYPEINFO();
@@ -112,6 +112,6 @@ class CanvasPath : public RefCountedDartWrappable<CanvasPath> {
SkPath path_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_PATH_H_

View File

@@ -15,7 +15,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
typedef CanvasPathMeasure PathMeasure;
@@ -132,4 +132,4 @@ bool CanvasPathMeasure::nextContour() {
return false;
}
} // namespace blink
} // namespace flutter

View File

@@ -20,7 +20,7 @@ class DartLibraryNatives;
// Be sure that the client doesn't modify a path on us before Skia finishes
// See AOSP's reasoning in PathMeasure.cpp
namespace blink {
namespace flutter {
class CanvasPathMeasure : public RefCountedDartWrappable<CanvasPathMeasure> {
DEFINE_WRAPPERTYPEINFO();
@@ -52,6 +52,6 @@ class CanvasPathMeasure : public RefCountedDartWrappable<CanvasPathMeasure> {
std::vector<sk_sp<SkContourMeasure>> measures_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_PATH_MEASURE_H_

View File

@@ -15,7 +15,7 @@
#include "third_party/tonic/dart_persistent_value.h"
#include "third_party/tonic/logging/dart_invoke.h"
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, Picture);
@@ -125,4 +125,4 @@ Dart_Handle Picture::RasterizeToImage(sk_sp<SkPicture> picture,
return Dart_Null();
}
} // namespace blink
} // namespace flutter

View File

@@ -14,7 +14,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Canvas;
class Picture : public RefCountedDartWrappable<Picture> {
@@ -48,6 +48,6 @@ class Picture : public RefCountedDartWrappable<Picture> {
flow::SkiaGPUObject<SkPicture> picture_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_PICTURE_H_

View File

@@ -11,7 +11,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
static void PictureRecorder_constructor(Dart_NativeArguments args) {
DartCallConstructor(&PictureRecorder::Create, args);
@@ -60,4 +60,4 @@ fml::RefPtr<Picture> PictureRecorder::endRecording() {
return picture;
}
} // namespace blink
} // namespace flutter

View File

@@ -12,7 +12,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Canvas;
class Picture;
@@ -41,6 +41,6 @@ class PictureRecorder : public RefCountedDartWrappable<PictureRecorder> {
fml::RefPtr<Canvas> canvas_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_PICTURE_RECORDER_H_

View File

@@ -8,7 +8,7 @@
#include "third_party/tonic/logging/dart_error.h"
#include "third_party/tonic/typed_data/float32_list.h"
using namespace blink;
using namespace flutter;
namespace tonic {

View File

@@ -9,7 +9,7 @@
#include "third_party/skia/include/core/SkRRect.h"
#include "third_party/tonic/converter/dart_converter.h"
namespace blink {
namespace flutter {
class RRect {
public:
@@ -17,16 +17,16 @@ class RRect {
bool is_null;
};
} // namespace blink
} // namespace flutter
namespace tonic {
template <>
struct DartConverter<blink::RRect> {
static blink::RRect FromDart(Dart_Handle handle);
static blink::RRect FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
struct DartConverter<flutter::RRect> {
static flutter::RRect FromDart(Dart_Handle handle);
static flutter::RRect FromArguments(Dart_NativeArguments args,
int index,
Dart_Handle& exception);
};
} // namespace tonic

View File

@@ -6,7 +6,7 @@
#include "flutter/lib/ui/ui_dart_state.h"
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, Shader);
@@ -15,4 +15,4 @@ Shader::Shader(flow::SkiaGPUObject<SkShader> shader)
Shader::~Shader() = default;
} // namespace blink
} // namespace flutter

View File

@@ -10,7 +10,7 @@
#include "flutter/lib/ui/ui_dart_state.h"
#include "third_party/skia/include/core/SkShader.h"
namespace blink {
namespace flutter {
class Shader : public RefCountedDartWrappable<Shader> {
DEFINE_WRAPPERTYPEINFO();
@@ -32,6 +32,6 @@ class Shader : public RefCountedDartWrappable<Shader> {
flow::SkiaGPUObject<SkShader> shader_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_SHADER_H_

View File

@@ -7,7 +7,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
namespace {
@@ -83,4 +83,4 @@ void Vertices::init(SkVertices::VertexMode vertex_mode,
vertices_ = builder.detach();
}
} // namespace blink
} // namespace flutter

View File

@@ -14,7 +14,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Vertices : public RefCountedDartWrappable<Vertices> {
DEFINE_WRAPPERTYPEINFO();
@@ -41,6 +41,6 @@ class Vertices : public RefCountedDartWrappable<Vertices> {
sk_sp<SkVertices> vertices_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PAINTING_VERTICES_H_

View File

@@ -19,7 +19,7 @@ using rapidjson::StringBuffer;
using rapidjson::Writer;
using tonic::ToDart;
namespace blink {
namespace flutter {
static const char* kHandleKey = "handle";
static const char* kRepresentationKey = "representation";
@@ -192,4 +192,4 @@ Dart_Handle DartCallbackCache::LookupDartClosure(
return closure;
}
} // namespace blink
} // namespace flutter

View File

@@ -14,7 +14,7 @@
#include "flutter/fml/synchronization/thread_annotations.h"
#include "third_party/dart/runtime/include/dart_api.h"
namespace blink {
namespace flutter {
typedef struct {
std::string name;
@@ -55,6 +55,6 @@ class DartCallbackCache {
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartCallbackCache);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_CALLBACK_CACHE_H_

View File

@@ -4,10 +4,10 @@
#include "flutter/lib/ui/semantics/custom_accessibility_action.h"
namespace blink {
namespace flutter {
CustomAccessibilityAction::CustomAccessibilityAction() = default;
CustomAccessibilityAction::~CustomAccessibilityAction() = default;
} // namespace blink
} // namespace flutter

View File

@@ -10,7 +10,7 @@
#include "third_party/tonic/typed_data/float64_list.h"
#include "third_party/tonic/typed_data/int32_list.h"
namespace blink {
namespace flutter {
/// A custom accessibility action is used to indicate additional semantics
/// actions that a user can perform on a semantics node beyond the
@@ -32,6 +32,6 @@ struct CustomAccessibilityAction {
using CustomAccessibilityActionUpdates =
std::unordered_map<int32_t, CustomAccessibilityAction>;
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_SEMANTICS_LOCAL_CONTEXT_ACTION_H_

View File

@@ -6,7 +6,7 @@
#include <string.h>
namespace blink {
namespace flutter {
constexpr int32_t kMinPlatformViewId = -1;
@@ -28,4 +28,4 @@ bool SemanticsNode::IsPlatformViewNode() const {
return platformViewId > kMinPlatformViewId;
}
} // namespace blink
} // namespace flutter

View File

@@ -14,7 +14,7 @@
#include "third_party/skia/include/core/SkMatrix44.h"
#include "third_party/skia/include/core/SkRect.h"
namespace blink {
namespace flutter {
// Must match the SemanticsAction enum in semantics.dart and in each of the
// embedders.
@@ -117,6 +117,6 @@ struct SemanticsNode {
// semantic information for the node corresponding to the ID.
using SemanticsNodeUpdates = std::unordered_map<int32_t, SemanticsNode>;
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_NODE_H_

View File

@@ -12,7 +12,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, SemanticsUpdate);
@@ -45,4 +45,4 @@ void SemanticsUpdate::dispose() {
ClearDartWrapper();
}
} // namespace blink
} // namespace flutter

View File

@@ -13,7 +13,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class SemanticsUpdate : public RefCountedDartWrappable<SemanticsUpdate> {
DEFINE_WRAPPERTYPEINFO();
@@ -41,6 +41,6 @@ class SemanticsUpdate : public RefCountedDartWrappable<SemanticsUpdate> {
CustomAccessibilityActionUpdates actions_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_UPDATE_H_

View File

@@ -9,7 +9,7 @@
#include "third_party/tonic/dart_binding_macros.h"
#include "third_party/tonic/dart_library_natives.h"
namespace blink {
namespace flutter {
static void SemanticsUpdateBuilder_constructor(Dart_NativeArguments args) {
DartCallConstructor(&SemanticsUpdateBuilder::create, args);
@@ -114,4 +114,4 @@ fml::RefPtr<SemanticsUpdate> SemanticsUpdateBuilder::build() {
return SemanticsUpdate::create(std::move(nodes_), std::move(actions_));
}
} // namespace blink
} // namespace flutter

View File

@@ -10,7 +10,7 @@
#include "third_party/tonic/typed_data/float64_list.h"
#include "third_party/tonic/typed_data/int32_list.h"
namespace blink {
namespace flutter {
class SemanticsUpdateBuilder
: public RefCountedDartWrappable<SemanticsUpdateBuilder> {
@@ -68,6 +68,6 @@ class SemanticsUpdateBuilder
CustomAccessibilityActionUpdates actions_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_UPDATE_BUILDER_H_

View File

@@ -8,7 +8,7 @@
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace blink {
namespace flutter {
class SnapshotDelegate {
public:
@@ -16,6 +16,6 @@ class SnapshotDelegate {
SkISize picture_size) = 0;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_SNAPSHOT_DELEGATE_H_

View File

@@ -10,7 +10,7 @@
#include "third_party/skia/include/core/SkString.h"
#include "third_party/skia/include/core/SkTypeface.h"
namespace blink {
namespace flutter {
namespace {
@@ -21,7 +21,7 @@ void MappingReleaseProc(const void* ptr, void* context) {
} // anonymous namespace
AssetManagerFontProvider::AssetManagerFontProvider(
std::shared_ptr<blink::AssetManager> asset_manager)
std::shared_ptr<flutter::AssetManager> asset_manager)
: asset_manager_(asset_manager) {}
AssetManagerFontProvider::~AssetManagerFontProvider() = default;
@@ -65,7 +65,7 @@ void AssetManagerFontProvider::RegisterAsset(std::string family_name,
}
AssetManagerFontStyleSet::AssetManagerFontStyleSet(
std::shared_ptr<blink::AssetManager> asset_manager)
std::shared_ptr<flutter::AssetManager> asset_manager)
: asset_manager_(asset_manager) {}
AssetManagerFontStyleSet::~AssetManagerFontStyleSet() = default;
@@ -131,4 +131,4 @@ AssetManagerFontStyleSet::TypefaceAsset::TypefaceAsset(
AssetManagerFontStyleSet::TypefaceAsset::~TypefaceAsset() = default;
} // namespace blink
} // namespace flutter

View File

@@ -16,11 +16,12 @@
#include "third_party/skia/include/core/SkTypeface.h"
#include "txt/font_asset_provider.h"
namespace blink {
namespace flutter {
class AssetManagerFontStyleSet : public SkFontStyleSet {
public:
AssetManagerFontStyleSet(std::shared_ptr<blink::AssetManager> asset_manager);
AssetManagerFontStyleSet(
std::shared_ptr<flutter::AssetManager> asset_manager);
~AssetManagerFontStyleSet() override;
@@ -39,7 +40,7 @@ class AssetManagerFontStyleSet : public SkFontStyleSet {
SkTypeface* matchStyle(const SkFontStyle& pattern) override;
private:
std::shared_ptr<blink::AssetManager> asset_manager_;
std::shared_ptr<flutter::AssetManager> asset_manager_;
struct TypefaceAsset {
TypefaceAsset(std::string a);
@@ -58,7 +59,8 @@ class AssetManagerFontStyleSet : public SkFontStyleSet {
class AssetManagerFontProvider : public txt::FontAssetProvider {
public:
AssetManagerFontProvider(std::shared_ptr<blink::AssetManager> asset_manager);
AssetManagerFontProvider(
std::shared_ptr<flutter::AssetManager> asset_manager);
~AssetManagerFontProvider() override;
@@ -82,6 +84,6 @@ class AssetManagerFontProvider : public txt::FontAssetProvider {
FML_DISALLOW_COPY_AND_ASSIGN(AssetManagerFontProvider);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_ASSET_MANAGER_FONT_PROVIDER_H_

View File

@@ -23,7 +23,7 @@
#include "txt/asset_font_manager.h"
#include "txt/test_font_manager.h"
namespace blink {
namespace flutter {
namespace {
@@ -161,4 +161,4 @@ void FontCollection::LoadFontFromList(const uint8_t* font_data,
collection_->ClearFontFamilyCache();
}
} // namespace blink
} // namespace flutter

View File

@@ -17,7 +17,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class FontCollection {
public:
@@ -44,6 +44,6 @@ class FontCollection {
FML_DISALLOW_COPY_AND_ASSIGN(FontCollection);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_FONT_COLLECTION_H_

View File

@@ -15,7 +15,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, Paragraph);
@@ -101,4 +101,4 @@ Dart_Handle Paragraph::getWordBoundary(unsigned offset) {
return m_paragraphImpl->getWordBoundary(offset);
}
} // namespace blink
} // namespace flutter

View File

@@ -17,7 +17,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Paragraph : public RefCountedDartWrappable<Paragraph> {
DEFINE_WRAPPERTYPEINFO();
@@ -59,6 +59,6 @@ class Paragraph : public RefCountedDartWrappable<Paragraph> {
explicit Paragraph(std::unique_ptr<txt::Paragraph> paragraph);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_PARAGRAPH_H_

View File

@@ -24,7 +24,7 @@
#include "third_party/tonic/dart_library_natives.h"
#include "third_party/tonic/typed_data/dart_byte_data.h"
namespace blink {
namespace flutter {
namespace {
// TextStyle
@@ -275,7 +275,7 @@ ParagraphBuilder::ParagraphBuilder(
UIDartState::Current()->window()->client()->GetFontCollection();
m_paragraphBuilder = std::make_unique<txt::ParagraphBuilder>(
style, font_collection.GetFontCollection());
} // namespace blink
} // namespace flutter
ParagraphBuilder::~ParagraphBuilder() = default;
@@ -434,4 +434,4 @@ fml::RefPtr<Paragraph> ParagraphBuilder::build() {
return Paragraph::Create(m_paragraphBuilder->Build());
}
} // namespace blink
} // namespace flutter

View File

@@ -16,7 +16,7 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Paragraph;
@@ -72,6 +72,6 @@ class ParagraphBuilder : public RefCountedDartWrappable<ParagraphBuilder> {
std::unique_ptr<txt::ParagraphBuilder> m_paragraphBuilder;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_PARAGRAPH_BUILDER_H_

View File

@@ -4,4 +4,4 @@
#include "flutter/lib/ui/text/paragraph_impl.h"
namespace blink {} // namespace blink
namespace flutter {} // namespace flutter

View File

@@ -9,7 +9,7 @@
#include "flutter/lib/ui/text/text_box.h"
#include "flutter/third_party/txt/src/txt/paragraph.h"
namespace blink {
namespace flutter {
class ParagraphImpl {
public:
@@ -44,6 +44,6 @@ class ParagraphImpl {
virtual Dart_Handle getWordBoundary(unsigned offset) = 0;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_PARAGRAPH_IMPL_H_

View File

@@ -14,7 +14,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
ParagraphImplTxt::ParagraphImplTxt(std::unique_ptr<txt::Paragraph> paragraph)
: m_paragraph(std::move(paragraph)) {}
@@ -71,7 +71,7 @@ std::vector<TextBox> ParagraphImplTxt::getRectsForRange(
start, end, rect_height_style, rect_width_style);
for (const txt::Paragraph::TextBox& box : boxes) {
result.emplace_back(box.rect,
static_cast<blink::TextDirection>(box.direction));
static_cast<flutter::TextDirection>(box.direction));
}
return result;
}
@@ -93,4 +93,4 @@ Dart_Handle ParagraphImplTxt::getWordBoundary(unsigned offset) {
return result;
}
} // namespace blink
} // namespace flutter

View File

@@ -9,7 +9,7 @@
#include "flutter/lib/ui/text/paragraph_impl.h"
#include "flutter/lib/ui/text/text_box.h"
namespace blink {
namespace flutter {
class ParagraphImplTxt : public ParagraphImpl {
public:
@@ -41,6 +41,6 @@ class ParagraphImplTxt : public ParagraphImpl {
double m_width = -1.0;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_TEXT_PARAGRAPH_IMPL_TXT_H_

View File

@@ -9,7 +9,7 @@
#include "third_party/tonic/dart_state.h"
#include "third_party/tonic/logging/dart_error.h"
using namespace blink;
using namespace flutter;
namespace tonic {

View File

@@ -9,7 +9,7 @@
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/tonic/converter/dart_converter.h"
namespace blink {
namespace flutter {
enum class TextDirection {
rtl,
@@ -23,17 +23,17 @@ struct TextBox {
TextBox(SkRect r, TextDirection d) : rect(r), direction(d) {}
};
} // namespace blink
} // namespace flutter
namespace tonic {
template <>
struct DartConverter<blink::TextBox> {
static Dart_Handle ToDart(const blink::TextBox& val);
struct DartConverter<flutter::TextBox> {
static Dart_Handle ToDart(const flutter::TextBox& val);
};
template <>
struct DartListFactory<blink::TextBox> {
struct DartListFactory<flutter::TextBox> {
static Dart_Handle NewList(intptr_t length);
};

View File

@@ -11,7 +11,7 @@
using tonic::ToDart;
namespace blink {
namespace flutter {
UIDartState::UIDartState(
TaskRunners task_runners,
@@ -149,4 +149,4 @@ void UIDartState::ReportUnhandledException(const std::string& error,
<< stack_trace;
}
} // namespace blink
} // namespace flutter

View File

@@ -23,7 +23,7 @@
#include "third_party/tonic/dart_persistent_value.h"
#include "third_party/tonic/dart_state.h"
namespace blink {
namespace flutter {
class FontSelector;
class Window;
@@ -112,6 +112,6 @@ class UIDartState : public tonic::DartState {
void AddOrRemoveTaskObserver(bool add);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_UI_DART_STATE_H_

View File

@@ -12,7 +12,7 @@
using tonic::DartConverter;
namespace blink {
namespace flutter {
// returns a vector with 3 versions.
// Dart, Skia and Flutter engine versions in this order.
@@ -28,4 +28,4 @@ void Versions::RegisterNatives(tonic::DartLibraryNatives* natives) {
natives->Register({{"Versions_getVersions", GetVersions, 0, true}});
}
} // namespace blink
} // namespace flutter

View File

@@ -9,13 +9,13 @@ namespace tonic {
class DartLibraryNatives;
} // namespace tonic
namespace blink {
namespace flutter {
class Versions final {
public:
static void RegisterNatives(tonic::DartLibraryNatives* natives);
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_VERSIONS_H_

View File

@@ -6,7 +6,7 @@
#include <utility>
namespace blink {
namespace flutter {
PlatformMessage::PlatformMessage(std::string channel,
std::vector<uint8_t> data,
@@ -24,4 +24,4 @@ PlatformMessage::PlatformMessage(std::string channel,
PlatformMessage::~PlatformMessage() = default;
} // namespace blink
} // namespace flutter

View File

@@ -12,7 +12,7 @@
#include "flutter/fml/memory/ref_ptr.h"
#include "flutter/lib/ui/window/platform_message_response.h"
namespace blink {
namespace flutter {
class PlatformMessage : public fml::RefCountedThreadSafe<PlatformMessage> {
FML_FRIEND_REF_COUNTED_THREAD_SAFE(PlatformMessage);
@@ -41,6 +41,6 @@ class PlatformMessage : public fml::RefCountedThreadSafe<PlatformMessage> {
fml::RefPtr<PlatformMessageResponse> response_;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PLATFORM_PLATFORM_MESSAGE_H_

View File

@@ -4,10 +4,10 @@
#include "flutter/lib/ui/window/platform_message_response.h"
namespace blink {
namespace flutter {
PlatformMessageResponse::PlatformMessageResponse() = default;
PlatformMessageResponse::~PlatformMessageResponse() = default;
} // namespace blink
} // namespace flutter

View File

@@ -11,7 +11,7 @@
#include "flutter/fml/memory/ref_counted.h"
#include "flutter/fml/memory/ref_ptr.h"
namespace blink {
namespace flutter {
class PlatformMessageResponse
: public fml::RefCountedThreadSafe<PlatformMessageResponse> {
@@ -31,6 +31,6 @@ class PlatformMessageResponse
bool is_complete_ = false;
};
} // namespace blink
} // namespace flutter
#endif // FLUTTER_LIB_UI_PLATFORM_PLATFORM_MESSAGE_RESPONSE_H_

Some files were not shown because too many files have changed in this diff Show More