Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit eec74e5

Browse files
authored
Rename the blink namespace to flutter. (#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.
1 parent fff80a0 commit eec74e5

File tree

211 files changed

+932
-915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+932
-915
lines changed

assets/asset_manager.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "flutter/assets/directory_asset_bundle.h"
88
#include "flutter/fml/trace_event.h"
99

10-
namespace blink {
10+
namespace flutter {
1111

1212
AssetManager::AssetManager() = default;
1313

@@ -29,7 +29,7 @@ void AssetManager::PushBack(std::unique_ptr<AssetResolver> resolver) {
2929
resolvers_.push_back(std::move(resolver));
3030
}
3131

32-
// |blink::AssetResolver|
32+
// |flutter::AssetResolver|
3333
std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
3434
const std::string& asset_name) const {
3535
if (asset_name.size() == 0) {
@@ -47,9 +47,9 @@ std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
4747
return nullptr;
4848
}
4949

50-
// |blink::AssetResolver|
50+
// |flutter::AssetResolver|
5151
bool AssetManager::IsValid() const {
5252
return resolvers_.size() > 0;
5353
}
5454

55-
} // namespace blink
55+
} // namespace flutter

assets/asset_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "flutter/fml/macros.h"
1414
#include "flutter/fml/memory/ref_counted.h"
1515

16-
namespace blink {
16+
namespace flutter {
1717

1818
class AssetManager final : public AssetResolver {
1919
public:
@@ -25,10 +25,10 @@ class AssetManager final : public AssetResolver {
2525

2626
void PushBack(std::unique_ptr<AssetResolver> resolver);
2727

28-
// |blink::AssetResolver|
28+
// |flutter::AssetResolver|
2929
bool IsValid() const override;
3030

31-
// |blink::AssetResolver|
31+
// |flutter::AssetResolver|
3232
std::unique_ptr<fml::Mapping> GetAsMapping(
3333
const std::string& asset_name) const override;
3434

@@ -38,6 +38,6 @@ class AssetManager final : public AssetResolver {
3838
FML_DISALLOW_COPY_AND_ASSIGN(AssetManager);
3939
};
4040

41-
} // namespace blink
41+
} // namespace flutter
4242

4343
#endif // FLUTTER_ASSETS_ASSET_MANAGER_H_

assets/asset_resolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "flutter/fml/macros.h"
1212
#include "flutter/fml/mapping.h"
1313

14-
namespace blink {
14+
namespace flutter {
1515

1616
class AssetResolver {
1717
public:
@@ -29,6 +29,6 @@ class AssetResolver {
2929
FML_DISALLOW_COPY_AND_ASSIGN(AssetResolver);
3030
};
3131

32-
} // namespace blink
32+
} // namespace flutter
3333

3434
#endif // FLUTTER_ASSETS_ASSET_RESOLVER_H_

assets/directory_asset_bundle.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "flutter/fml/file.h"
1111
#include "flutter/fml/mapping.h"
1212

13-
namespace blink {
13+
namespace flutter {
1414

1515
DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)
1616
: descriptor_(std::move(descriptor)) {
@@ -22,12 +22,12 @@ DirectoryAssetBundle::DirectoryAssetBundle(fml::UniqueFD descriptor)
2222

2323
DirectoryAssetBundle::~DirectoryAssetBundle() = default;
2424

25-
// |blink::AssetResolver|
25+
// |flutter::AssetResolver|
2626
bool DirectoryAssetBundle::IsValid() const {
2727
return is_valid_;
2828
}
2929

30-
// |blink::AssetResolver|
30+
// |flutter::AssetResolver|
3131
std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
3232
const std::string& asset_name) const {
3333
if (!is_valid_) {
@@ -45,4 +45,4 @@ std::unique_ptr<fml::Mapping> DirectoryAssetBundle::GetAsMapping(
4545
return mapping;
4646
}
4747

48-
} // namespace blink
48+
} // namespace flutter

assets/directory_asset_bundle.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "flutter/fml/memory/ref_counted.h"
1111
#include "flutter/fml/unique_fd.h"
1212

13-
namespace blink {
13+
namespace flutter {
1414

1515
class DirectoryAssetBundle : public AssetResolver {
1616
public:
@@ -22,16 +22,16 @@ class DirectoryAssetBundle : public AssetResolver {
2222
const fml::UniqueFD descriptor_;
2323
bool is_valid_ = false;
2424

25-
// |blink::AssetResolver|
25+
// |flutter::AssetResolver|
2626
bool IsValid() const override;
2727

28-
// |blink::AssetResolver|
28+
// |flutter::AssetResolver|
2929
std::unique_ptr<fml::Mapping> GetAsMapping(
3030
const std::string& asset_name) const override;
3131

3232
FML_DISALLOW_COPY_AND_ASSIGN(DirectoryAssetBundle);
3333
};
3434

35-
} // namespace blink
35+
} // namespace flutter
3636

3737
#endif // FLUTTER_ASSETS_DIRECTORY_ASSET_BUNDLE_H_

assets/zip_asset_store.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "flutter/fml/trace_event.h"
1818

19-
namespace blink {
19+
namespace flutter {
2020

2121
void UniqueUnzipperTraits::Free(void* file) {
2222
unzClose(file);
@@ -33,12 +33,12 @@ UniqueUnzipper ZipAssetStore::CreateUnzipper() const {
3333
return UniqueUnzipper{::unzOpen2(file_path_.c_str(), nullptr)};
3434
}
3535

36-
// |blink::AssetResolver|
36+
// |flutter::AssetResolver|
3737
bool ZipAssetStore::IsValid() const {
3838
return stat_cache_.size() > 0;
3939
}
4040

41-
// |blink::AssetResolver|
41+
// |flutter::AssetResolver|
4242
std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
4343
const std::string& asset_name) const {
4444
TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
@@ -126,4 +126,4 @@ void ZipAssetStore::BuildStatCache() {
126126
} while (unzGoToNextFile(unzipper.get()) == UNZ_OK);
127127
}
128128

129-
} // namespace blink
129+
} // namespace flutter

assets/zip_asset_store.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "flutter/fml/macros.h"
1212
#include "third_party/zlib/contrib/minizip/unzip.h"
1313

14-
namespace blink {
14+
namespace flutter {
1515

1616
struct UniqueUnzipperTraits {
1717
static inline void* InvalidValue() { return nullptr; }
@@ -40,10 +40,10 @@ class ZipAssetStore final : public AssetResolver {
4040

4141
mutable std::map<std::string, CacheEntry> stat_cache_;
4242

43-
// |blink::AssetResolver|
43+
// |flutter::AssetResolver|
4444
bool IsValid() const override;
4545

46-
// |blink::AssetResolver|
46+
// |flutter::AssetResolver|
4747
std::unique_ptr<fml::Mapping> GetAsMapping(
4848
const std::string& asset_name) const override;
4949

@@ -54,6 +54,6 @@ class ZipAssetStore final : public AssetResolver {
5454
FML_DISALLOW_COPY_AND_ASSIGN(ZipAssetStore);
5555
};
5656

57-
} // namespace blink
57+
} // namespace flutter
5858

5959
#endif // FLUTTER_ASSETS_ZIP_ASSET_STORE_H_

common/settings.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <sstream>
88

9-
namespace blink {
9+
namespace flutter {
1010

1111
Settings::Settings() = default;
1212

@@ -54,4 +54,4 @@ std::string Settings::ToString() const {
5454
return stream.str();
5555
}
5656

57-
} // namespace blink
57+
} // namespace flutter

common/settings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "flutter/fml/mapping.h"
1717
#include "flutter/fml/unique_fd.h"
1818

19-
namespace blink {
19+
namespace flutter {
2020

2121
using TaskObserverAdd =
2222
std::function<void(intptr_t /* key */, fml::closure /* callback */)>;
@@ -145,6 +145,6 @@ struct Settings {
145145
std::string ToString() const;
146146
};
147147

148-
} // namespace blink
148+
} // namespace flutter
149149

150150
#endif // FLUTTER_COMMON_SETTINGS_H_

common/task_runners.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <utility>
88

9-
namespace blink {
9+
namespace flutter {
1010

1111
TaskRunners::TaskRunners(std::string label,
1212
fml::RefPtr<fml::TaskRunner> platform,
@@ -47,4 +47,4 @@ bool TaskRunners::IsValid() const {
4747
return platform_ && gpu_ && ui_ && io_;
4848
}
4949

50-
} // namespace blink
50+
} // namespace flutter

common/task_runners.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "flutter/fml/macros.h"
1111
#include "flutter/fml/task_runner.h"
1212

13-
namespace blink {
13+
namespace flutter {
1414

1515
class TaskRunners {
1616
public:
@@ -44,6 +44,6 @@ class TaskRunners {
4444
fml::RefPtr<fml::TaskRunner> io_;
4545
};
4646

47-
} // namespace blink
47+
} // namespace flutter
4848

4949
#endif // FLUTTER_COMMON_TASK_RUNNERS_H_

common/version/version.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "flutter/common/version/version.h"
66

7-
namespace blink {
7+
namespace flutter {
88

99
const char* GetFlutterEngineVersion() {
1010
return FLUTTER_ENGINE_VERSION;
@@ -18,4 +18,4 @@ const char* GetDartVersion() {
1818
return DART_VERSION;
1919
}
2020

21-
} // namespace blink
21+
} // namespace flutter

common/version/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
#ifndef FLUTTER_COMMON_VERSION_VERSION_H_
66
#define FLUTTER_COMMON_VERSION_VERSION_H_
77

8-
namespace blink {
8+
namespace flutter {
99

1010
const char* GetFlutterEngineVersion();
1111

1212
const char* GetSkiaVersion();
1313

1414
const char* GetDartVersion();
1515

16-
} // namespace blink
16+
} // namespace flutter
1717

1818
#endif // FLUTTER_COMMON_VERSION_VERSION_H_

lib/io/dart_io.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
using tonic::ToDart;
1212

13-
namespace blink {
13+
namespace flutter {
1414

1515
void DartIO::InitForIsolate() {
1616
Dart_Handle result = Dart_SetNativeResolver(
@@ -25,4 +25,4 @@ bool DartIO::EntropySource(uint8_t* buffer, intptr_t length) {
2525
return dart::bin::GetEntropy(buffer, length);
2626
}
2727

28-
} // namespace blink
28+
} // namespace flutter

lib/io/dart_io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "flutter/fml/macros.h"
1111

12-
namespace blink {
12+
namespace flutter {
1313

1414
class DartIO {
1515
public:
@@ -20,6 +20,6 @@ class DartIO {
2020
FML_DISALLOW_IMPLICIT_CONSTRUCTORS(DartIO);
2121
};
2222

23-
} // namespace blink
23+
} // namespace flutter
2424

2525
#endif // FLUTTER_LIB_IO_DART_IO_H_

lib/ui/compositing/scene.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "third_party/tonic/dart_binding_macros.h"
1515
#include "third_party/tonic/dart_library_natives.h"
1616

17-
namespace blink {
17+
namespace flutter {
1818

1919
IMPLEMENT_WRAPPERTYPEINFO(ui, Scene);
2020

@@ -72,4 +72,4 @@ std::unique_ptr<flow::LayerTree> Scene::takeLayerTree() {
7272
return std::move(m_layerTree);
7373
}
7474

75-
} // namespace blink
75+
} // namespace flutter

lib/ui/compositing/scene.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace tonic {
1616
class DartLibraryNatives;
1717
} // namespace tonic
1818

19-
namespace blink {
19+
namespace flutter {
2020

2121
class Scene : public RefCountedDartWrappable<Scene> {
2222
DEFINE_WRAPPERTYPEINFO();
@@ -48,6 +48,6 @@ class Scene : public RefCountedDartWrappable<Scene> {
4848
std::unique_ptr<flow::LayerTree> m_layerTree;
4949
};
5050

51-
} // namespace blink
51+
} // namespace flutter
5252

5353
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_H_

lib/ui/compositing/scene_builder.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "flutter/flow/layers/child_scene_layer.h"
3636
#endif
3737

38-
namespace blink {
38+
namespace flutter {
3939

4040
static void SceneBuilder_constructor(Dart_NativeArguments args) {
4141
DartCallConstructor(&SceneBuilder::create, args);
@@ -327,4 +327,4 @@ void SceneBuilder::PushLayer(std::shared_ptr<flow::ContainerLayer> layer) {
327327
current_layer_ = newLayer;
328328
}
329329

330-
} // namespace blink
330+
} // namespace flutter

lib/ui/compositing/scene_builder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "flutter/lib/ui/compositing/scene_host.h"
2525
#endif
2626

27-
namespace blink {
27+
namespace flutter {
2828

2929
class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
3030
DEFINE_WRAPPERTYPEINFO();
@@ -120,6 +120,6 @@ class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
120120
FML_DISALLOW_COPY_AND_ASSIGN(SceneBuilder);
121121
};
122122

123-
} // namespace blink
123+
} // namespace flutter
124124

125125
#endif // FLUTTER_LIB_UI_COMPOSITING_SCENE_BUILDER_H_

0 commit comments

Comments
 (0)