mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Rename flow namespace to flutter (#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
This commit is contained in:
parent
0534b6ae55
commit
8ff631f3df
@ -7,7 +7,7 @@
|
||||
#include "flutter/flow/layers/layer_tree.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
CompositorContext::CompositorContext() = default;
|
||||
|
||||
@ -60,7 +60,7 @@ CompositorContext::ScopedFrame::~ScopedFrame() {
|
||||
context_.EndFrame(*this, instrumentation_enabled_);
|
||||
}
|
||||
|
||||
bool CompositorContext::ScopedFrame::Raster(flow::LayerTree& layer_tree,
|
||||
bool CompositorContext::ScopedFrame::Raster(flutter::LayerTree& layer_tree,
|
||||
bool ignore_raster_cache) {
|
||||
layer_tree.Preroll(*this, ignore_raster_cache);
|
||||
// Clearing canvas after preroll reduces one render target switch when preroll
|
||||
@ -82,4 +82,4 @@ void CompositorContext::OnGrContextDestroyed() {
|
||||
raster_cache_.Clear();
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
#include "third_party/skia/include/core/SkPictureRecorder.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class LayerTree;
|
||||
|
||||
@ -97,6 +97,6 @@ class CompositorContext {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(CompositorContext);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_COMPOSITOR_CONTEXT_H_
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
|
||||
#include "third_party/skia/include/core/SkString.h"
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const flow::MatrixDecomposition& m) {
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
const flutter::MatrixDecomposition& m) {
|
||||
if (!m.IsValid()) {
|
||||
os << "Invalid Matrix!" << std::endl;
|
||||
return os;
|
||||
@ -72,7 +73,7 @@ std::ostream& operator<<(std::ostream& os, const SkPoint& r) {
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os,
|
||||
const flow::PictureRasterCacheKey& k) {
|
||||
const flutter::PictureRasterCacheKey& k) {
|
||||
os << "Picture: " << k.id() << " matrix: " << k.matrix();
|
||||
return os;
|
||||
}
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
|
||||
#define DEF_PRINTER(x) std::ostream& operator<<(std::ostream&, const x&);
|
||||
|
||||
DEF_PRINTER(flow::MatrixDecomposition);
|
||||
DEF_PRINTER(flow::PictureRasterCacheKey);
|
||||
DEF_PRINTER(flutter::MatrixDecomposition);
|
||||
DEF_PRINTER(flutter::PictureRasterCacheKey);
|
||||
DEF_PRINTER(SkISize);
|
||||
DEF_PRINTER(SkMatrix);
|
||||
DEF_PRINTER(SkMatrix44);
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
|
||||
#include "flutter/flow/embedded_views.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
bool ExternalViewEmbedder::SubmitFrame(GrContext* context) {
|
||||
return false;
|
||||
};
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "third_party/skia/include/core/SkPoint.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class EmbeddedViewParams {
|
||||
public:
|
||||
@ -44,6 +44,6 @@ class ExternalViewEmbedder {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ExternalViewEmbedder);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_EMBEDDED_VIEWS_H_
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
namespace {
|
||||
|
||||
using ExportNodeBindings =
|
||||
std::unordered_map<zx_koid_t, std::unique_ptr<flow::ExportNode>>;
|
||||
std::unordered_map<zx_koid_t, std::unique_ptr<flutter::ExportNode>>;
|
||||
|
||||
FML_THREAD_LOCAL fml::ThreadLocal tls_export_node_bindings([](intptr_t value) {
|
||||
delete reinterpret_cast<ExportNodeBindings*>(value);
|
||||
@ -17,7 +17,7 @@ FML_THREAD_LOCAL fml::ThreadLocal tls_export_node_bindings([](intptr_t value) {
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ExportNode::ExportNode(zx::eventpair export_token)
|
||||
: pending_export_token_(std::move(export_token)) {
|
||||
@ -82,4 +82,4 @@ void ExportNode::UpdateScene(SceneUpdateContext& context,
|
||||
: fuchsia::ui::gfx::HitTestBehavior::kSuppress);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include "flutter/flow/scene_update_context.h"
|
||||
#include "flutter/fml/macros.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// Represents a Scenic |ExportNode| resource that exports an |EntityNode| to
|
||||
// another session.
|
||||
@ -45,6 +45,6 @@ class ExportNode {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ExportNode);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_EXPORT_NODE_H_
|
||||
|
||||
@ -23,9 +23,9 @@
|
||||
int main(int argc, char** argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
fml::CommandLine cmd = fml::CommandLineFromArgcArgv(argc, argv);
|
||||
flow::SetGoldenDir(
|
||||
flutter::SetGoldenDir(
|
||||
cmd.GetOptionValueWithDefault("golden-dir", "flutter/testing/resources"));
|
||||
flow::SetFontFile(cmd.GetOptionValueWithDefault(
|
||||
flutter::SetFontFile(cmd.GetOptionValueWithDefault(
|
||||
"font-file",
|
||||
"flutter/third_party/txt/third_party/fonts/Roboto-Regular.ttf"));
|
||||
return RUN_ALL_TESTS();
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
static std::string gGoldenDir;
|
||||
static std::string gFontFile;
|
||||
@ -37,4 +37,4 @@ void SetFontFile(const std::string& file) {
|
||||
gFontFile = file;
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
const std::string& GetGoldenDir();
|
||||
|
||||
@ -26,4 +26,4 @@ const std::string& GetFontFile();
|
||||
|
||||
void SetFontFile(const std::string& dir);
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "third_party/skia/include/core/SkPath.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
static const size_t kMaxSamples = 120;
|
||||
static const size_t kMaxFrameMarkers = 8;
|
||||
@ -311,4 +311,4 @@ int64_t CounterValues::GetMinValue() const {
|
||||
return min;
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "flutter/fml/time/time_point.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// DEPRECATED
|
||||
// The frame per second FPS could be different than 60 (e.g., 120).
|
||||
@ -94,6 +94,6 @@ class CounterValues {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(CounterValues);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_INSTRUMENTATION_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/backdrop_filter_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
BackdropFilterLayer::BackdropFilterLayer() = default;
|
||||
|
||||
@ -20,4 +20,4 @@ void BackdropFilterLayer::Paint(PaintContext& context) const {
|
||||
PaintChildren(context);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include "third_party/skia/include/core/SkImageFilter.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class BackdropFilterLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -26,6 +26,6 @@ class BackdropFilterLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(BackdropFilterLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_BACKDROP_FILTER_LAYER_H_
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#include "flutter/flow/export_node.h"
|
||||
#include "flutter/flow/view_holder.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ChildSceneLayer::ChildSceneLayer(zx_koid_t layer_id,
|
||||
bool use_view_holder,
|
||||
@ -44,4 +44,4 @@ void ChildSceneLayer::UpdateScene(SceneUpdateContext& context) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "flutter/flow/layers/layer.h"
|
||||
#include "flutter/flow/scene_update_context.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// Layer that represents an embedded child.
|
||||
class ChildSceneLayer : public Layer {
|
||||
@ -40,6 +40,6 @@ class ChildSceneLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ChildSceneLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_CHILD_SCENE_LAYER_H_
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
#endif // defined(OS_FUCHSIA)
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ClipPathLayer::ClipPathLayer(Clip clip_behavior)
|
||||
: clip_behavior_(clip_behavior) {
|
||||
@ -69,4 +69,4 @@ void ClipPathLayer::Paint(PaintContext& context) const {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ClipPathLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -31,6 +31,6 @@ class ClipPathLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ClipPathLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_CLIP_PATH_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/clip_rect_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ClipRectLayer::ClipRectLayer(Clip clip_behavior)
|
||||
: clip_behavior_(clip_behavior) {
|
||||
@ -59,4 +59,4 @@ void ClipRectLayer::Paint(PaintContext& context) const {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ClipRectLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -30,6 +30,6 @@ class ClipRectLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ClipRectLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_CLIP_RECT_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/clip_rrect_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ClipRRectLayer::ClipRRectLayer(Clip clip_behavior)
|
||||
: clip_behavior_(clip_behavior) {
|
||||
@ -67,4 +67,4 @@ void ClipRRectLayer::Paint(PaintContext& context) const {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ClipRRectLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -31,6 +31,6 @@ class ClipRRectLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ClipRRectLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_CLIP_RRECT_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/color_filter_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ColorFilterLayer::ColorFilterLayer() = default;
|
||||
|
||||
@ -22,4 +22,4 @@ void ColorFilterLayer::Paint(PaintContext& context) const {
|
||||
PaintChildren(context);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ColorFilterLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -27,6 +27,6 @@ class ColorFilterLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ColorFilterLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_COLOR_FILTER_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ContainerLayer::ContainerLayer() {}
|
||||
|
||||
@ -69,4 +69,4 @@ void ContainerLayer::UpdateSceneChildren(SceneUpdateContext& context) {
|
||||
|
||||
#endif // defined(OS_FUCHSIA)
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
#include "flutter/flow/layers/layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ContainerLayer : public Layer {
|
||||
public:
|
||||
@ -44,6 +44,6 @@ class ContainerLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ContainerLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_CONTAINER_LAYER_H_
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#include "flutter/flow/paint_utils.h"
|
||||
#include "third_party/skia/include/core/SkColorFilter.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
Layer::Layer()
|
||||
: parent_(nullptr),
|
||||
@ -55,4 +55,4 @@ Layer::AutoSaveLayer::~AutoSaveLayer() {
|
||||
paint_context_.internal_nodes_canvas->restore();
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#endif // defined(OS_FUCHSIA)
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
static constexpr SkRect kGiantRect = SkRect::MakeLTRB(-1E9F, -1E9F, 1E9F, 1E9F);
|
||||
|
||||
@ -151,6 +151,6 @@ class Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Layer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_LAYER_H_
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "third_party/skia/include/core/SkPictureRecorder.h"
|
||||
#include "third_party/skia/include/utils/SkNWayCanvas.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
LayerTree::LayerTree()
|
||||
: frame_size_{},
|
||||
@ -150,4 +150,4 @@ sk_sp<SkPicture> LayerTree::Flatten(const SkRect& bounds) {
|
||||
return recorder.finishRecordingAsPicture();
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#include "third_party/skia/include/core/SkPicture.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class LayerTree {
|
||||
public:
|
||||
@ -83,6 +83,6 @@ class LayerTree {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(LayerTree);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_LAYER_TREE_H_
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
#include "flutter/flow/layers/transform_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
OpacityLayer::OpacityLayer() = default;
|
||||
|
||||
@ -19,7 +19,7 @@ void OpacityLayer::EnsureSingleChild() {
|
||||
return;
|
||||
}
|
||||
|
||||
auto new_child = std::make_shared<flow::TransformLayer>();
|
||||
auto new_child = std::make_shared<flutter::TransformLayer>();
|
||||
|
||||
// Be careful: SkMatrix's default constructor doesn't initialize the matrix to
|
||||
// identity. Hence we have to explicitly call SkMatrix::setIdentity.
|
||||
@ -104,4 +104,4 @@ void OpacityLayer::Paint(PaintContext& context) const {
|
||||
PaintChildren(context);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class OpacityLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -41,6 +41,6 @@ class OpacityLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(OpacityLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_OPACITY_LAYER_H_
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "flutter/flow/layers/performance_overlay_layer.h"
|
||||
#include "third_party/skia/include/core/SkFont.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
namespace {
|
||||
|
||||
void DrawStatisticsText(SkCanvas& canvas,
|
||||
@ -94,4 +94,4 @@ void PerformanceOverlayLayer::Paint(PaintContext& context) const {
|
||||
options_ & kDisplayEngineStatistics, "UI", font_path_);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "flutter/flow/layers/layer.h"
|
||||
#include "flutter/fml/macros.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
const int kDisplayRasterizerStatistics = 1 << 0;
|
||||
const int kVisualizeRasterizerStatistics = 1 << 1;
|
||||
@ -31,6 +31,6 @@ class PerformanceOverlayLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PerformanceOverlayLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_PERFORMANCE_OVERLAY_LAYER_H_
|
||||
|
||||
@ -28,13 +28,13 @@ const char* kGoldenFileName = "performance_overlay_gold.png";
|
||||
const char* kNewGoldenFileName = "performance_overlay_gold_new.png";
|
||||
|
||||
TEST(PerformanceOverlayLayer, Gold) {
|
||||
const std::string& golden_dir = flow::GetGoldenDir();
|
||||
const std::string& golden_dir = flutter::GetGoldenDir();
|
||||
// This unit test should only be run on Linux (not even on Mac since it's a
|
||||
// golden test). Hence we don't have to worry about the "/" vs. "\".
|
||||
std::string golden_file_path = golden_dir + "/" + kGoldenFileName;
|
||||
std::string new_golden_file_path = golden_dir + "/" + kNewGoldenFileName;
|
||||
|
||||
flow::Stopwatch mock_stopwatch;
|
||||
flutter::Stopwatch mock_stopwatch;
|
||||
for (int i = 0; i < size(kMockedTimes); ++i) {
|
||||
mock_stopwatch.SetLapTime(
|
||||
fml::TimeDelta::FromMilliseconds(kMockedTimes[i]));
|
||||
@ -45,19 +45,20 @@ TEST(PerformanceOverlayLayer, Gold) {
|
||||
|
||||
ASSERT_TRUE(surface != nullptr);
|
||||
|
||||
flow::TextureRegistry unused_texture_registry;
|
||||
flutter::TextureRegistry unused_texture_registry;
|
||||
|
||||
flow::Layer::PaintContext paintContext = {
|
||||
flutter::Layer::PaintContext paintContext = {
|
||||
nullptr, surface->getCanvas(), nullptr, nullptr, mock_stopwatch,
|
||||
mock_stopwatch, unused_texture_registry, nullptr, false};
|
||||
|
||||
// Specify font file to ensure the same font across different operation
|
||||
// systems.
|
||||
flow::PerformanceOverlayLayer layer(flow::kDisplayRasterizerStatistics |
|
||||
flow::kVisualizeRasterizerStatistics |
|
||||
flow::kDisplayEngineStatistics |
|
||||
flow::kVisualizeEngineStatistics,
|
||||
flow::GetFontFile().c_str());
|
||||
flutter::PerformanceOverlayLayer layer(
|
||||
flutter::kDisplayRasterizerStatistics |
|
||||
flutter::kVisualizeRasterizerStatistics |
|
||||
flutter::kDisplayEngineStatistics |
|
||||
flutter::kVisualizeEngineStatistics,
|
||||
flutter::GetFontFile().c_str());
|
||||
layer.set_paint_bounds(SkRect::MakeWH(1000, 400));
|
||||
surface->getCanvas()->clear(SK_ColorTRANSPARENT);
|
||||
layer.Paint(paintContext);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#include "flutter/flow/paint_utils.h"
|
||||
#include "third_party/skia/include/utils/SkShadowUtils.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
const SkScalar kLightHeight = 600;
|
||||
const SkScalar kLightRadius = 800;
|
||||
@ -204,4 +204,4 @@ void PhysicalShapeLayer::DrawShadow(SkCanvas* canvas,
|
||||
dpr * kLightRadius, ambientColor, spotColor, flags);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class PhysicalShapeLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -54,6 +54,6 @@ class PhysicalShapeLayer : public ContainerLayer {
|
||||
Clip clip_behavior_;
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_PHYSICAL_SHAPE_LAYER_H_
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
#include "flutter/fml/logging.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
PictureLayer::PictureLayer() = default;
|
||||
|
||||
@ -52,4 +52,4 @@ void PictureLayer::Paint(PaintContext& context) const {
|
||||
context.leaf_nodes_canvas->drawPicture(picture());
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "flutter/flow/raster_cache.h"
|
||||
#include "flutter/flow/skia_gpu_object.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class PictureLayer : public Layer {
|
||||
public:
|
||||
@ -43,6 +43,6 @@ class PictureLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PictureLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_PICTURE_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/platform_view_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
PlatformViewLayer::PlatformViewLayer() = default;
|
||||
|
||||
@ -39,4 +39,4 @@ void PlatformViewLayer::Paint(PaintContext& context) const {
|
||||
context.view_embedder->CompositeEmbeddedView(view_id_, params);
|
||||
context.leaf_nodes_canvas = canvas;
|
||||
}
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "third_party/skia/include/core/SkPoint.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class PlatformViewLayer : public Layer {
|
||||
public:
|
||||
@ -31,6 +31,6 @@ class PlatformViewLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PlatformViewLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_PLATFORM_VIEW_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/shader_mask_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ShaderMaskLayer::ShaderMaskLayer() = default;
|
||||
|
||||
@ -26,4 +26,4 @@ void ShaderMaskLayer::Paint(PaintContext& context) const {
|
||||
SkRect::MakeWH(mask_rect_.width(), mask_rect_.height()), paint);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include "third_party/skia/include/core/SkShader.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class ShaderMaskLayer : public ContainerLayer {
|
||||
public:
|
||||
@ -32,6 +32,6 @@ class ShaderMaskLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ShaderMaskLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_SHADER_MASK_LAYER_H_
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
#include "flutter/flow/texture.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
TextureLayer::TextureLayer() = default;
|
||||
|
||||
@ -27,4 +27,4 @@ void TextureLayer::Paint(PaintContext& context) const {
|
||||
context.gr_context);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "third_party/skia/include/core/SkPoint.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class TextureLayer : public Layer {
|
||||
public:
|
||||
@ -33,6 +33,6 @@ class TextureLayer : public Layer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(TextureLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/layers/transform_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
TransformLayer::TransformLayer() {
|
||||
transform_.setIdentity();
|
||||
@ -69,4 +69,4 @@ void TransformLayer::Paint(PaintContext& context) const {
|
||||
PaintChildren(context);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#include "flutter/flow/layers/container_layer.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// Be careful that SkMatrix's default constructor doesn't initialize the matrix
|
||||
// at all. Hence |set_transform| must be called with an initialized SkMatrix.
|
||||
@ -32,6 +32,6 @@ class TransformLayer : public ContainerLayer {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(TransformLayer);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_LAYERS_TRANSFORM_LAYER_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/matrix_decomposition.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
static inline SkVector3 SkVector3Combine(const SkVector3& a,
|
||||
float a_scale,
|
||||
@ -151,4 +151,4 @@ bool MatrixDecomposition::IsValid() const {
|
||||
return valid_;
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "third_party/skia/include/core/SkMatrix44.h"
|
||||
#include "third_party/skia/include/core/SkPoint3.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
/// Decomposes a given non-degenerate transformation matrix into a sequence of
|
||||
/// operations that produced it. The validity of the decomposition must always
|
||||
@ -46,6 +46,6 @@ class MatrixDecomposition {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(MatrixDecomposition);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_MATRIX_DECOMPOSITION_H_
|
||||
|
||||
@ -18,7 +18,7 @@ TEST(MatrixDecomposition, Rotation) {
|
||||
const auto angle = M_PI_4;
|
||||
matrix.setRotateAbout(0.0, 0.0, 1.0, angle);
|
||||
|
||||
flow::MatrixDecomposition decomposition(matrix);
|
||||
flutter::MatrixDecomposition decomposition(matrix);
|
||||
ASSERT_TRUE(decomposition.IsValid());
|
||||
|
||||
const auto sine = sin(angle * 0.5);
|
||||
@ -35,7 +35,7 @@ TEST(MatrixDecomposition, Scale) {
|
||||
const auto scale = 5.0;
|
||||
matrix.setScale(scale + 0, scale + 1, scale + 2);
|
||||
|
||||
flow::MatrixDecomposition decomposition(matrix);
|
||||
flutter::MatrixDecomposition decomposition(matrix);
|
||||
ASSERT_TRUE(decomposition.IsValid());
|
||||
|
||||
ASSERT_FLOAT_EQ(scale + 0, decomposition.scale().fX);
|
||||
@ -49,7 +49,7 @@ TEST(MatrixDecomposition, Translate) {
|
||||
const auto translate = 125.0;
|
||||
matrix.setTranslate(translate + 0, translate + 1, translate + 2);
|
||||
|
||||
flow::MatrixDecomposition decomposition(matrix);
|
||||
flutter::MatrixDecomposition decomposition(matrix);
|
||||
ASSERT_TRUE(decomposition.IsValid());
|
||||
|
||||
ASSERT_FLOAT_EQ(translate + 0, decomposition.translation().fX);
|
||||
@ -73,7 +73,7 @@ TEST(MatrixDecomposition, Combination) {
|
||||
|
||||
SkMatrix44 combined = m3 * m2 * m1;
|
||||
|
||||
flow::MatrixDecomposition decomposition(combined);
|
||||
flutter::MatrixDecomposition decomposition(combined);
|
||||
ASSERT_TRUE(decomposition.IsValid());
|
||||
|
||||
ASSERT_FLOAT_EQ(translate, decomposition.translation().fX);
|
||||
@ -97,7 +97,7 @@ TEST(MatrixDecomposition, ScaleFloatError) {
|
||||
SkMatrix44 matrix = SkMatrix44::I();
|
||||
matrix.setScale(scale, scale, 1.0f);
|
||||
|
||||
flow::MatrixDecomposition decomposition3(matrix);
|
||||
flutter::MatrixDecomposition decomposition3(matrix);
|
||||
ASSERT_TRUE(decomposition3.IsValid());
|
||||
|
||||
ASSERT_FLOAT_EQ(scale, decomposition3.scale().fX);
|
||||
@ -122,13 +122,13 @@ TEST(MatrixDecomposition, ScaleFloatError) {
|
||||
SkMatrix44 matrix3 = SkMatrix44::I();
|
||||
matrix3.setScale(scale3, scale3, 1.f);
|
||||
|
||||
flow::MatrixDecomposition decomposition(matrix);
|
||||
flutter::MatrixDecomposition decomposition(matrix);
|
||||
ASSERT_TRUE(decomposition.IsValid());
|
||||
|
||||
flow::MatrixDecomposition decomposition2(matrix2);
|
||||
flutter::MatrixDecomposition decomposition2(matrix2);
|
||||
ASSERT_TRUE(decomposition2.IsValid());
|
||||
|
||||
flow::MatrixDecomposition decomposition3(matrix3);
|
||||
flutter::MatrixDecomposition decomposition3(matrix3);
|
||||
ASSERT_TRUE(decomposition3.IsValid());
|
||||
|
||||
ASSERT_FLOAT_EQ(scale, decomposition.scale().fX);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "third_party/skia/include/core/SkPaint.h"
|
||||
#include "third_party/skia/include/core/SkShader.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
namespace {
|
||||
|
||||
@ -50,4 +50,4 @@ void DrawCheckerboard(SkCanvas* canvas, const SkRect& rect) {
|
||||
canvas->drawRect(rect, debugPaint);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,12 +9,12 @@
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/skia/include/core/SkRect.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
void DrawCheckerboard(SkCanvas* canvas, SkColor c1, SkColor c2, int size);
|
||||
|
||||
void DrawCheckerboard(SkCanvas* canvas, const SkRect& rect);
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_PAINT_UTILS_H_
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include "third_party/skia/include/core/SkPicture.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
RasterCacheResult::RasterCacheResult() {}
|
||||
|
||||
@ -292,4 +292,4 @@ void RasterCache::TraceStatsToTimeline() const {
|
||||
#endif // FLUTTER_RUNTIME_MODE != FLUTTER_RUNTIME_MODE_RELEASE
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include "third_party/skia/include/core/SkImage.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class RasterCacheResult {
|
||||
public:
|
||||
@ -137,6 +137,6 @@ class RasterCache {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(RasterCache);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_RASTER_CACHE_H_
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
|
||||
#include "flutter/flow/raster_cache_key.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
//
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "flutter/flow/matrix_decomposition.h"
|
||||
#include "flutter/fml/logging.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
template <typename ID>
|
||||
class RasterCacheKey {
|
||||
@ -58,6 +58,6 @@ class Layer;
|
||||
|
||||
using LayerRasterCacheKey = RasterCacheKey<Layer*>;
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_RASTER_CACHE_KEY_H_
|
||||
|
||||
@ -18,13 +18,13 @@ sk_sp<SkPicture> GetSamplePicture() {
|
||||
}
|
||||
|
||||
TEST(RasterCache, SimpleInitialization) {
|
||||
flow::RasterCache cache;
|
||||
flutter::RasterCache cache;
|
||||
ASSERT_TRUE(true);
|
||||
}
|
||||
|
||||
TEST(RasterCache, ThresholdIsRespected) {
|
||||
size_t threshold = 3;
|
||||
flow::RasterCache cache(threshold);
|
||||
flutter::RasterCache cache(threshold);
|
||||
|
||||
SkMatrix matrix = SkMatrix::I();
|
||||
|
||||
@ -46,7 +46,7 @@ TEST(RasterCache, ThresholdIsRespected) {
|
||||
|
||||
TEST(RasterCache, ThresholdIsRespectedWhenZero) {
|
||||
size_t threshold = 0;
|
||||
flow::RasterCache cache(threshold);
|
||||
flutter::RasterCache cache(threshold);
|
||||
|
||||
SkMatrix matrix = SkMatrix::I();
|
||||
|
||||
@ -68,7 +68,7 @@ TEST(RasterCache, ThresholdIsRespectedWhenZero) {
|
||||
|
||||
TEST(RasterCache, SweepsRemoveUnusedFrames) {
|
||||
size_t threshold = 3;
|
||||
flow::RasterCache cache(threshold);
|
||||
flutter::RasterCache cache(threshold);
|
||||
|
||||
SkMatrix matrix = SkMatrix::I();
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "flutter/fml/trace_event.h"
|
||||
#include "flutter/lib/ui/window/viewport_metrics.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// Helper function to generate clip planes for a scenic::EntityNode.
|
||||
static void SetEntityNodeClipPlanes(scenic::EntityNode* entity_node,
|
||||
@ -188,7 +188,8 @@ scenic::Image* SceneUpdateContext::GenerateImageIfNeeded(
|
||||
return image;
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<flow::SceneUpdateContext::SurfaceProducerSurface>>
|
||||
std::vector<
|
||||
std::unique_ptr<flutter::SceneUpdateContext::SurfaceProducerSurface>>
|
||||
SceneUpdateContext::ExecutePaintTasks(CompositorContext::ScopedFrame& frame) {
|
||||
TRACE_EVENT0("flutter", "SceneUpdateContext::ExecutePaintTasks");
|
||||
std::vector<std::unique_ptr<SurfaceProducerSurface>> surfaces_to_submit;
|
||||
@ -331,4 +332,4 @@ SceneUpdateContext::Clip::Clip(SceneUpdateContext& context,
|
||||
SetEntityNodeClipPlanes(&entity_node(), shape_bounds);
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
#include "third_party/skia/include/core/SkRect.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class Layer;
|
||||
|
||||
@ -232,6 +232,6 @@ class SceneUpdateContext {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(SceneUpdateContext);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_SCENE_UPDATE_CONTEXT_H_
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
#include "flutter/fml/message_loop.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
SkiaUnrefQueue::SkiaUnrefQueue(fml::RefPtr<fml::TaskRunner> task_runner,
|
||||
fml::TimeDelta delay)
|
||||
@ -41,4 +41,4 @@ void SkiaUnrefQueue::Drain() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#include "flutter/fml/task_runner.h"
|
||||
#include "third_party/skia/include/core/SkRefCnt.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// A queue that holds Skia objects that must be destructed on the the given task
|
||||
// runner.
|
||||
@ -83,6 +83,6 @@ class SkiaGPUObject {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(SkiaGPUObject);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_SKIA_GPU_OBJECT_H_
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/flow/texture.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
TextureRegistry::TextureRegistry() = default;
|
||||
|
||||
@ -39,4 +39,4 @@ Texture::Texture(int64_t id) : id_(id) {}
|
||||
|
||||
Texture::~Texture() = default;
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "flutter/fml/synchronization/waitable_event.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
class Texture {
|
||||
protected:
|
||||
@ -70,6 +70,6 @@ class TextureRegistry {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(TextureRegistry);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_TEXTURE_H_
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
namespace {
|
||||
|
||||
using ViewHolderBindings =
|
||||
std::unordered_map<zx_koid_t, std::unique_ptr<flow::ViewHolder>>;
|
||||
std::unordered_map<zx_koid_t, std::unique_ptr<flutter::ViewHolder>>;
|
||||
|
||||
FML_THREAD_LOCAL fml::ThreadLocal tls_view_holder_bindings([](intptr_t value) {
|
||||
delete reinterpret_cast<ViewHolderBindings*>(value);
|
||||
@ -47,7 +47,7 @@ fuchsia::ui::gfx::ViewProperties ToViewProperties(float width,
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
ViewHolder::ViewHolder(fml::RefPtr<fml::TaskRunner> ui_task_runner,
|
||||
fuchsia::ui::views::ViewHolderToken view_holder_token,
|
||||
@ -148,4 +148,4 @@ void ViewHolder::SetProperties(double width,
|
||||
has_pending_properties_ = true;
|
||||
}
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include "flutter/fml/memory/ref_counted.h"
|
||||
#include "flutter/fml/task_runner.h"
|
||||
|
||||
namespace flow {
|
||||
namespace flutter {
|
||||
|
||||
// Represents a Scenic |ViewHolder| resource that imports a |View| from another
|
||||
// session.
|
||||
@ -70,6 +70,6 @@ class ViewHolder {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ViewHolder);
|
||||
};
|
||||
|
||||
} // namespace flow
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_FLOW_VIEW_HOLDER_H_
|
||||
|
||||
@ -24,7 +24,7 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Scene);
|
||||
|
||||
DART_BIND_ALL(Scene, FOR_EACH_BINDING)
|
||||
|
||||
fml::RefPtr<Scene> Scene::create(std::shared_ptr<flow::Layer> rootLayer,
|
||||
fml::RefPtr<Scene> Scene::create(std::shared_ptr<flutter::Layer> rootLayer,
|
||||
uint32_t rasterizerTracingThreshold,
|
||||
bool checkerboardRasterCacheImages,
|
||||
bool checkerboardOffscreenLayers) {
|
||||
@ -33,11 +33,11 @@ fml::RefPtr<Scene> Scene::create(std::shared_ptr<flow::Layer> rootLayer,
|
||||
checkerboardRasterCacheImages, checkerboardOffscreenLayers);
|
||||
}
|
||||
|
||||
Scene::Scene(std::shared_ptr<flow::Layer> rootLayer,
|
||||
Scene::Scene(std::shared_ptr<flutter::Layer> rootLayer,
|
||||
uint32_t rasterizerTracingThreshold,
|
||||
bool checkerboardRasterCacheImages,
|
||||
bool checkerboardOffscreenLayers)
|
||||
: m_layerTree(new flow::LayerTree()) {
|
||||
: m_layerTree(new flutter::LayerTree()) {
|
||||
m_layerTree->set_root_layer(std::move(rootLayer));
|
||||
m_layerTree->set_rasterizer_tracing_threshold(rasterizerTracingThreshold);
|
||||
m_layerTree->set_checkerboard_raster_cache_images(
|
||||
@ -68,7 +68,7 @@ Dart_Handle Scene::toImage(uint32_t width,
|
||||
return Picture::RasterizeToImage(picture, width, height, raw_image_callback);
|
||||
}
|
||||
|
||||
std::unique_ptr<flow::LayerTree> Scene::takeLayerTree() {
|
||||
std::unique_ptr<flutter::LayerTree> Scene::takeLayerTree() {
|
||||
return std::move(m_layerTree);
|
||||
}
|
||||
|
||||
|
||||
@ -24,12 +24,12 @@ class Scene : public RefCountedDartWrappable<Scene> {
|
||||
|
||||
public:
|
||||
~Scene() override;
|
||||
static fml::RefPtr<Scene> create(std::shared_ptr<flow::Layer> rootLayer,
|
||||
static fml::RefPtr<Scene> create(std::shared_ptr<flutter::Layer> rootLayer,
|
||||
uint32_t rasterizerTracingThreshold,
|
||||
bool checkerboardRasterCacheImages,
|
||||
bool checkerboardOffscreenLayers);
|
||||
|
||||
std::unique_ptr<flow::LayerTree> takeLayerTree();
|
||||
std::unique_ptr<flutter::LayerTree> takeLayerTree();
|
||||
|
||||
Dart_Handle toImage(uint32_t width,
|
||||
uint32_t height,
|
||||
@ -40,12 +40,12 @@ class Scene : public RefCountedDartWrappable<Scene> {
|
||||
static void RegisterNatives(tonic::DartLibraryNatives* natives);
|
||||
|
||||
private:
|
||||
explicit Scene(std::shared_ptr<flow::Layer> rootLayer,
|
||||
explicit Scene(std::shared_ptr<flutter::Layer> rootLayer,
|
||||
uint32_t rasterizerTracingThreshold,
|
||||
bool checkerboardRasterCacheImages,
|
||||
bool checkerboardOffscreenLayers);
|
||||
|
||||
std::unique_ptr<flow::LayerTree> m_layerTree;
|
||||
std::unique_ptr<flutter::LayerTree> m_layerTree;
|
||||
};
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -86,7 +86,7 @@ SceneBuilder::~SceneBuilder() = default;
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushTransform(
|
||||
tonic::Float64List& matrix4) {
|
||||
SkMatrix sk_matrix = ToSkMatrix(matrix4);
|
||||
auto layer = std::make_shared<flow::TransformLayer>();
|
||||
auto layer = std::make_shared<flutter::TransformLayer>();
|
||||
layer->set_transform(sk_matrix);
|
||||
PushLayer(layer);
|
||||
// matrix4 has to be released before we can return another Dart object
|
||||
@ -96,7 +96,7 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushTransform(
|
||||
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushOffset(double dx, double dy) {
|
||||
SkMatrix sk_matrix = SkMatrix::MakeTrans(dx, dy);
|
||||
auto layer = std::make_shared<flow::TransformLayer>();
|
||||
auto layer = std::make_shared<flutter::TransformLayer>();
|
||||
layer->set_transform(sk_matrix);
|
||||
PushLayer(layer);
|
||||
return EngineLayer::MakeRetained(layer);
|
||||
@ -108,8 +108,8 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushClipRect(double left,
|
||||
double bottom,
|
||||
int clipBehavior) {
|
||||
SkRect clipRect = SkRect::MakeLTRB(left, top, right, bottom);
|
||||
flow::Clip clip_behavior = static_cast<flow::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flow::ClipRectLayer>(clip_behavior);
|
||||
flutter::Clip clip_behavior = static_cast<flutter::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flutter::ClipRectLayer>(clip_behavior);
|
||||
layer->set_clip_rect(clipRect);
|
||||
PushLayer(layer);
|
||||
return EngineLayer::MakeRetained(layer);
|
||||
@ -117,8 +117,8 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushClipRect(double left,
|
||||
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushClipRRect(const RRect& rrect,
|
||||
int clipBehavior) {
|
||||
flow::Clip clip_behavior = static_cast<flow::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flow::ClipRRectLayer>(clip_behavior);
|
||||
flutter::Clip clip_behavior = static_cast<flutter::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flutter::ClipRRectLayer>(clip_behavior);
|
||||
layer->set_clip_rrect(rrect.sk_rrect);
|
||||
PushLayer(layer);
|
||||
return EngineLayer::MakeRetained(layer);
|
||||
@ -126,9 +126,9 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushClipRRect(const RRect& rrect,
|
||||
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushClipPath(const CanvasPath* path,
|
||||
int clipBehavior) {
|
||||
flow::Clip clip_behavior = static_cast<flow::Clip>(clipBehavior);
|
||||
FML_DCHECK(clip_behavior != flow::Clip::none);
|
||||
auto layer = std::make_shared<flow::ClipPathLayer>(clip_behavior);
|
||||
flutter::Clip clip_behavior = static_cast<flutter::Clip>(clipBehavior);
|
||||
FML_DCHECK(clip_behavior != flutter::Clip::none);
|
||||
auto layer = std::make_shared<flutter::ClipPathLayer>(clip_behavior);
|
||||
layer->set_clip_path(path->path());
|
||||
PushLayer(layer);
|
||||
return EngineLayer::MakeRetained(layer);
|
||||
@ -137,7 +137,7 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushClipPath(const CanvasPath* path,
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushOpacity(int alpha,
|
||||
double dx,
|
||||
double dy) {
|
||||
auto layer = std::make_shared<flow::OpacityLayer>();
|
||||
auto layer = std::make_shared<flutter::OpacityLayer>();
|
||||
layer->set_alpha(alpha);
|
||||
layer->set_offset(SkPoint::Make(dx, dy));
|
||||
PushLayer(layer);
|
||||
@ -146,7 +146,7 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushOpacity(int alpha,
|
||||
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushColorFilter(int color,
|
||||
int blendMode) {
|
||||
auto layer = std::make_shared<flow::ColorFilterLayer>();
|
||||
auto layer = std::make_shared<flutter::ColorFilterLayer>();
|
||||
layer->set_color(static_cast<SkColor>(color));
|
||||
layer->set_blend_mode(static_cast<SkBlendMode>(blendMode));
|
||||
PushLayer(layer);
|
||||
@ -154,7 +154,7 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushColorFilter(int color,
|
||||
}
|
||||
|
||||
fml::RefPtr<EngineLayer> SceneBuilder::pushBackdropFilter(ImageFilter* filter) {
|
||||
auto layer = std::make_shared<flow::BackdropFilterLayer>();
|
||||
auto layer = std::make_shared<flutter::BackdropFilterLayer>();
|
||||
layer->set_filter(filter->filter());
|
||||
PushLayer(layer);
|
||||
return EngineLayer::MakeRetained(layer);
|
||||
@ -168,7 +168,7 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushShaderMask(Shader* shader,
|
||||
int blendMode) {
|
||||
SkRect rect = SkRect::MakeLTRB(maskRectLeft, maskRectTop, maskRectRight,
|
||||
maskRectBottom);
|
||||
auto layer = std::make_shared<flow::ShaderMaskLayer>();
|
||||
auto layer = std::make_shared<flutter::ShaderMaskLayer>();
|
||||
layer->set_shader(shader->shader());
|
||||
layer->set_mask_rect(rect);
|
||||
layer->set_blend_mode(static_cast<SkBlendMode>(blendMode));
|
||||
@ -182,8 +182,8 @@ fml::RefPtr<EngineLayer> SceneBuilder::pushPhysicalShape(const CanvasPath* path,
|
||||
int shadow_color,
|
||||
int clipBehavior) {
|
||||
const SkPath& sk_path = path->path();
|
||||
flow::Clip clip_behavior = static_cast<flow::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flow::PhysicalShapeLayer>(clip_behavior);
|
||||
flutter::Clip clip_behavior = static_cast<flutter::Clip>(clipBehavior);
|
||||
auto layer = std::make_shared<flutter::PhysicalShapeLayer>(clip_behavior);
|
||||
layer->set_path(sk_path);
|
||||
layer->set_elevation(elevation);
|
||||
layer->set_color(static_cast<SkColor>(color));
|
||||
@ -220,7 +220,7 @@ void SceneBuilder::addPicture(double dx,
|
||||
SkPoint offset = SkPoint::Make(dx, dy);
|
||||
SkRect pictureRect = picture->picture()->cullRect();
|
||||
pictureRect.offset(offset.x(), offset.y());
|
||||
auto layer = std::make_unique<flow::PictureLayer>();
|
||||
auto layer = std::make_unique<flutter::PictureLayer>();
|
||||
layer->set_offset(offset);
|
||||
layer->set_picture(UIDartState::CreateGPUObject(picture->picture()));
|
||||
layer->set_is_complex(!!(hints & 1));
|
||||
@ -237,7 +237,7 @@ void SceneBuilder::addTexture(double dx,
|
||||
if (!current_layer_) {
|
||||
return;
|
||||
}
|
||||
auto layer = std::make_unique<flow::TextureLayer>();
|
||||
auto layer = std::make_unique<flutter::TextureLayer>();
|
||||
layer->set_offset(SkPoint::Make(dx, dy));
|
||||
layer->set_size(SkSize::Make(width, height));
|
||||
layer->set_texture_id(textureId);
|
||||
@ -253,7 +253,7 @@ void SceneBuilder::addPlatformView(double dx,
|
||||
if (!current_layer_) {
|
||||
return;
|
||||
}
|
||||
auto layer = std::make_unique<flow::PlatformViewLayer>();
|
||||
auto layer = std::make_unique<flutter::PlatformViewLayer>();
|
||||
layer->set_offset(SkPoint::Make(dx, dy));
|
||||
layer->set_size(SkSize::Make(width, height));
|
||||
layer->set_view_id(viewId);
|
||||
@ -270,7 +270,7 @@ void SceneBuilder::addChildScene(double dx,
|
||||
if (!current_layer_) {
|
||||
return;
|
||||
}
|
||||
auto layer = std::make_unique<flow::ChildSceneLayer>(
|
||||
auto layer = std::make_unique<flutter::ChildSceneLayer>(
|
||||
sceneHost->id(), sceneHost->use_view_holder(), SkPoint::Make(dx, dy),
|
||||
SkSize::Make(width, height), hitTestable);
|
||||
current_layer_->Add(std::move(layer));
|
||||
@ -286,7 +286,8 @@ void SceneBuilder::addPerformanceOverlay(uint64_t enabledOptions,
|
||||
return;
|
||||
}
|
||||
SkRect rect = SkRect::MakeLTRB(left, top, right, bottom);
|
||||
auto layer = std::make_unique<flow::PerformanceOverlayLayer>(enabledOptions);
|
||||
auto layer =
|
||||
std::make_unique<flutter::PerformanceOverlayLayer>(enabledOptions);
|
||||
layer->set_paint_bounds(rect);
|
||||
current_layer_->Add(std::move(layer));
|
||||
}
|
||||
@ -311,7 +312,7 @@ fml::RefPtr<Scene> SceneBuilder::build() {
|
||||
return scene;
|
||||
}
|
||||
|
||||
void SceneBuilder::PushLayer(std::shared_ptr<flow::ContainerLayer> layer) {
|
||||
void SceneBuilder::PushLayer(std::shared_ptr<flutter::ContainerLayer> layer) {
|
||||
FML_DCHECK(layer);
|
||||
|
||||
if (!root_layer_) {
|
||||
@ -324,7 +325,7 @@ void SceneBuilder::PushLayer(std::shared_ptr<flow::ContainerLayer> layer) {
|
||||
return;
|
||||
}
|
||||
|
||||
flow::ContainerLayer* newLayer = layer.get();
|
||||
flutter::ContainerLayer* newLayer = layer.get();
|
||||
current_layer_->Add(std::move(layer));
|
||||
current_layer_ = newLayer;
|
||||
}
|
||||
|
||||
@ -108,14 +108,14 @@ class SceneBuilder : public RefCountedDartWrappable<SceneBuilder> {
|
||||
private:
|
||||
SceneBuilder();
|
||||
|
||||
std::shared_ptr<flow::ContainerLayer> root_layer_;
|
||||
flow::ContainerLayer* current_layer_ = nullptr;
|
||||
std::shared_ptr<flutter::ContainerLayer> root_layer_;
|
||||
flutter::ContainerLayer* current_layer_ = nullptr;
|
||||
|
||||
int rasterizer_tracing_threshold_ = 0;
|
||||
bool checkerboard_raster_cache_images_ = false;
|
||||
bool checkerboard_offscreen_layers_ = false;
|
||||
|
||||
void PushLayer(std::shared_ptr<flow::ContainerLayer> layer);
|
||||
void PushLayer(std::shared_ptr<flutter::ContainerLayer> layer);
|
||||
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(SceneBuilder);
|
||||
};
|
||||
|
||||
@ -121,7 +121,7 @@ SceneHost::SceneHost(fml::RefPtr<zircon::dart::Handle> exportTokenHandle)
|
||||
gpu_task_runner_->PostTask(
|
||||
[id = id_, handle = std::move(exportTokenHandle)]() {
|
||||
auto export_token = zx::eventpair(handle->ReleaseHandle());
|
||||
flow::ExportNode::Create(id, std::move(export_token));
|
||||
flutter::ExportNode::Create(id, std::move(export_token));
|
||||
});
|
||||
}
|
||||
|
||||
@ -163,9 +163,9 @@ SceneHost::SceneHost(fml::RefPtr<zircon::dart::Handle> viewHolderTokenHandle,
|
||||
bind_callback = std::move(bind_callback)]() {
|
||||
auto view_holder_token =
|
||||
scenic::ToViewHolderToken(zx::eventpair(handle->ReleaseHandle()));
|
||||
flow::ViewHolder::Create(id, std::move(ui_task_runner),
|
||||
std::move(view_holder_token),
|
||||
std::move(bind_callback));
|
||||
flutter::ViewHolder::Create(id, std::move(ui_task_runner),
|
||||
std::move(view_holder_token),
|
||||
std::move(bind_callback));
|
||||
});
|
||||
}
|
||||
|
||||
@ -176,9 +176,11 @@ SceneHost::~SceneHost() {
|
||||
FML_DCHECK(bindings);
|
||||
bindings->erase(id_);
|
||||
|
||||
gpu_task_runner_->PostTask([id = id_]() { flow::ViewHolder::Destroy(id); });
|
||||
gpu_task_runner_->PostTask(
|
||||
[id = id_]() { flutter::ViewHolder::Destroy(id); });
|
||||
} else {
|
||||
gpu_task_runner_->PostTask([id = id_]() { flow::ExportNode::Destroy(id); });
|
||||
gpu_task_runner_->PostTask(
|
||||
[id = id_]() { flutter::ExportNode::Destroy(id); });
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,7 +219,7 @@ void SceneHost::setProperties(double width,
|
||||
|
||||
gpu_task_runner_->PostTask([id = id_, width, height, insetTop, insetRight,
|
||||
insetBottom, insetLeft, focusable]() {
|
||||
auto* view_holder = flow::ViewHolder::FromId(id);
|
||||
auto* view_holder = flutter::ViewHolder::FromId(id);
|
||||
FML_DCHECK(view_holder);
|
||||
|
||||
view_holder->SetProperties(width, height, insetTop, insetRight, insetBottom,
|
||||
|
||||
@ -19,7 +19,7 @@ class IOManager {
|
||||
|
||||
virtual fml::WeakPtr<GrContext> GetResourceContext() const = 0;
|
||||
|
||||
virtual fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const = 0;
|
||||
virtual fml::RefPtr<flutter::SkiaUnrefQueue> GetSkiaUnrefQueue() const = 0;
|
||||
};
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -419,8 +419,8 @@ void Canvas::drawShadow(const CanvasPath* path,
|
||||
ToDart("Canvas.drawShader called with non-genuine Path."));
|
||||
SkScalar dpr =
|
||||
UIDartState::Current()->window()->viewport_metrics().device_pixel_ratio;
|
||||
flow::PhysicalShapeLayer::DrawShadow(canvas_, path->path(), color, elevation,
|
||||
transparentOccluder, dpr);
|
||||
flutter::PhysicalShapeLayer::DrawShadow(canvas_, path->path(), color,
|
||||
elevation, transparentOccluder, dpr);
|
||||
}
|
||||
|
||||
void Canvas::Clear() {
|
||||
|
||||
@ -81,7 +81,7 @@ static sk_sp<SkImage> DecodeImage(fml::WeakPtr<GrContext> context,
|
||||
|
||||
fml::RefPtr<Codec> InitCodec(fml::WeakPtr<GrContext> context,
|
||||
sk_sp<SkData> buffer,
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue,
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
|
||||
const float decodedCacheRatioCap,
|
||||
size_t trace_id) {
|
||||
TRACE_FLOW_STEP("flutter", kInitCodecTraceTag, trace_id);
|
||||
@ -117,7 +117,7 @@ fml::RefPtr<Codec> InitCodecUncompressed(
|
||||
fml::WeakPtr<GrContext> context,
|
||||
sk_sp<SkData> buffer,
|
||||
ImageInfo image_info,
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue,
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
|
||||
const float decodedCacheRatioCap,
|
||||
size_t trace_id) {
|
||||
TRACE_FLOW_STEP("flutter", kInitCodecTraceTag, trace_id);
|
||||
@ -147,7 +147,7 @@ fml::RefPtr<Codec> InitCodecUncompressed(
|
||||
void InitCodecAndInvokeCodecCallback(
|
||||
fml::RefPtr<fml::TaskRunner> ui_task_runner,
|
||||
fml::WeakPtr<GrContext> context,
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue,
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
|
||||
std::unique_ptr<DartPersistentValue> callback,
|
||||
sk_sp<SkData> buffer,
|
||||
std::unique_ptr<ImageInfo> image_info,
|
||||
@ -468,7 +468,7 @@ void MultiFrameCodec::GetNextFrameAndInvokeCallback(
|
||||
std::unique_ptr<DartPersistentValue> callback,
|
||||
fml::RefPtr<fml::TaskRunner> ui_task_runner,
|
||||
fml::WeakPtr<GrContext> resourceContext,
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue,
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
|
||||
size_t trace_id) {
|
||||
fml::RefPtr<FrameInfo> frameInfo = NULL;
|
||||
sk_sp<SkImage> skImage = GetNextFrameImage(resourceContext);
|
||||
|
||||
@ -52,7 +52,7 @@ class MultiFrameCodec : public Codec {
|
||||
std::unique_ptr<DartPersistentValue> callback,
|
||||
fml::RefPtr<fml::TaskRunner> ui_task_runner,
|
||||
fml::WeakPtr<GrContext> resourceContext,
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue,
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue,
|
||||
size_t trace_id);
|
||||
|
||||
const std::unique_ptr<SkCodec> codec_;
|
||||
|
||||
@ -15,7 +15,7 @@ using tonic::ToDart;
|
||||
|
||||
namespace flutter {
|
||||
|
||||
EngineLayer::EngineLayer(std::shared_ptr<flow::ContainerLayer> layer)
|
||||
EngineLayer::EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer)
|
||||
: layer_(layer) {}
|
||||
|
||||
EngineLayer::~EngineLayer() = default;
|
||||
|
||||
@ -26,17 +26,17 @@ class EngineLayer : public RefCountedDartWrappable<EngineLayer> {
|
||||
size_t GetAllocationSize() override;
|
||||
|
||||
static fml::RefPtr<EngineLayer> MakeRetained(
|
||||
std::shared_ptr<flow::ContainerLayer> layer) {
|
||||
std::shared_ptr<flutter::ContainerLayer> layer) {
|
||||
return fml::MakeRefCounted<EngineLayer>(layer);
|
||||
}
|
||||
|
||||
static void RegisterNatives(tonic::DartLibraryNatives* natives);
|
||||
|
||||
std::shared_ptr<flow::ContainerLayer> Layer() const { return layer_; }
|
||||
std::shared_ptr<flutter::ContainerLayer> Layer() const { return layer_; }
|
||||
|
||||
private:
|
||||
explicit EngineLayer(std::shared_ptr<flow::ContainerLayer> layer);
|
||||
std::shared_ptr<flow::ContainerLayer> layer_;
|
||||
explicit EngineLayer(std::shared_ptr<flutter::ContainerLayer> layer);
|
||||
std::shared_ptr<flutter::ContainerLayer> layer_;
|
||||
|
||||
FML_FRIEND_MAKE_REF_COUNTED(EngineLayer);
|
||||
};
|
||||
|
||||
@ -35,7 +35,7 @@ class CanvasImage final : public RefCountedDartWrappable<CanvasImage> {
|
||||
void dispose();
|
||||
|
||||
sk_sp<SkImage> image() const { return image_.get(); }
|
||||
void set_image(flow::SkiaGPUObject<SkImage> image) {
|
||||
void set_image(flutter::SkiaGPUObject<SkImage> image) {
|
||||
image_ = std::move(image);
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class CanvasImage final : public RefCountedDartWrappable<CanvasImage> {
|
||||
private:
|
||||
CanvasImage();
|
||||
|
||||
flow::SkiaGPUObject<SkImage> image_;
|
||||
flutter::SkiaGPUObject<SkImage> image_;
|
||||
};
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -26,11 +26,12 @@ IMPLEMENT_WRAPPERTYPEINFO(ui, Picture);
|
||||
|
||||
DART_BIND_ALL(Picture, FOR_EACH_BINDING)
|
||||
|
||||
fml::RefPtr<Picture> Picture::Create(flow::SkiaGPUObject<SkPicture> picture) {
|
||||
fml::RefPtr<Picture> Picture::Create(
|
||||
flutter::SkiaGPUObject<SkPicture> picture) {
|
||||
return fml::MakeRefCounted<Picture>(std::move(picture));
|
||||
}
|
||||
|
||||
Picture::Picture(flow::SkiaGPUObject<SkPicture> picture)
|
||||
Picture::Picture(flutter::SkiaGPUObject<SkPicture> picture)
|
||||
: picture_(std::move(picture)) {}
|
||||
|
||||
Picture::~Picture() = default;
|
||||
|
||||
@ -23,7 +23,7 @@ class Picture : public RefCountedDartWrappable<Picture> {
|
||||
|
||||
public:
|
||||
~Picture() override;
|
||||
static fml::RefPtr<Picture> Create(flow::SkiaGPUObject<SkPicture> picture);
|
||||
static fml::RefPtr<Picture> Create(flutter::SkiaGPUObject<SkPicture> picture);
|
||||
|
||||
sk_sp<SkPicture> picture() const { return picture_.get(); }
|
||||
|
||||
@ -43,9 +43,9 @@ class Picture : public RefCountedDartWrappable<Picture> {
|
||||
Dart_Handle raw_image_callback);
|
||||
|
||||
private:
|
||||
explicit Picture(flow::SkiaGPUObject<SkPicture> picture);
|
||||
explicit Picture(flutter::SkiaGPUObject<SkPicture> picture);
|
||||
|
||||
flow::SkiaGPUObject<SkPicture> picture_;
|
||||
flutter::SkiaGPUObject<SkPicture> picture_;
|
||||
};
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -10,7 +10,7 @@ namespace flutter {
|
||||
|
||||
IMPLEMENT_WRAPPERTYPEINFO(ui, Shader);
|
||||
|
||||
Shader::Shader(flow::SkiaGPUObject<SkShader> shader)
|
||||
Shader::Shader(flutter::SkiaGPUObject<SkShader> shader)
|
||||
: shader_(std::move(shader)) {}
|
||||
|
||||
Shader::~Shader() = default;
|
||||
|
||||
@ -21,15 +21,15 @@ class Shader : public RefCountedDartWrappable<Shader> {
|
||||
|
||||
sk_sp<SkShader> shader() { return shader_.get(); }
|
||||
|
||||
void set_shader(flow::SkiaGPUObject<SkShader> shader) {
|
||||
void set_shader(flutter::SkiaGPUObject<SkShader> shader) {
|
||||
shader_ = std::move(shader);
|
||||
}
|
||||
|
||||
protected:
|
||||
Shader(flow::SkiaGPUObject<SkShader> shader = {});
|
||||
Shader(flutter::SkiaGPUObject<SkShader> shader = {});
|
||||
|
||||
private:
|
||||
flow::SkiaGPUObject<SkShader> shader_;
|
||||
flutter::SkiaGPUObject<SkShader> shader_;
|
||||
};
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@ -78,7 +78,7 @@ const TaskRunners& UIDartState::GetTaskRunners() const {
|
||||
return task_runners_;
|
||||
}
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> UIDartState::GetSkiaUnrefQueue() const {
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> UIDartState::GetSkiaUnrefQueue() const {
|
||||
if (!io_manager_) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ class UIDartState : public tonic::DartState {
|
||||
|
||||
void FlushMicrotasksNow();
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const;
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> GetSkiaUnrefQueue() const;
|
||||
|
||||
fml::WeakPtr<SnapshotDelegate> GetSnapshotDelegate() const;
|
||||
|
||||
@ -61,7 +61,7 @@ class UIDartState : public tonic::DartState {
|
||||
const std::string& stack_trace);
|
||||
|
||||
template <class T>
|
||||
static flow::SkiaGPUObject<T> CreateGPUObject(sk_sp<T> object) {
|
||||
static flutter::SkiaGPUObject<T> CreateGPUObject(sk_sp<T> object) {
|
||||
if (!object) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ class RuntimeDelegate {
|
||||
|
||||
virtual void ScheduleFrame(bool regenerate_layer_tree = true) = 0;
|
||||
|
||||
virtual void Render(std::unique_ptr<flow::LayerTree> layer_tree) = 0;
|
||||
virtual void Render(std::unique_ptr<flutter::LayerTree> layer_tree) = 0;
|
||||
|
||||
virtual void UpdateSemantics(SemanticsNodeUpdates update,
|
||||
CustomAccessibilityActionUpdates actions) = 0;
|
||||
|
||||
@ -157,7 +157,7 @@ void Animator::BeginFrame(fml::TimePoint frame_start_time,
|
||||
}
|
||||
}
|
||||
|
||||
void Animator::Render(std::unique_ptr<flow::LayerTree> layer_tree) {
|
||||
void Animator::Render(std::unique_ptr<flutter::LayerTree> layer_tree) {
|
||||
if (dimension_change_pending_ &&
|
||||
layer_tree->frame_size() != last_layer_tree_size_) {
|
||||
dimension_change_pending_ = false;
|
||||
|
||||
@ -27,7 +27,7 @@ class Animator final {
|
||||
virtual void OnAnimatorNotifyIdle(int64_t deadline) = 0;
|
||||
|
||||
virtual void OnAnimatorDraw(
|
||||
fml::RefPtr<Pipeline<flow::LayerTree>> pipeline) = 0;
|
||||
fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline) = 0;
|
||||
|
||||
virtual void OnAnimatorDrawLastLayerTree() = 0;
|
||||
};
|
||||
@ -42,7 +42,7 @@ class Animator final {
|
||||
|
||||
void RequestFrame(bool regenerate_layer_tree = true);
|
||||
|
||||
void Render(std::unique_ptr<flow::LayerTree> layer_tree);
|
||||
void Render(std::unique_ptr<flutter::LayerTree> layer_tree);
|
||||
|
||||
void Start();
|
||||
|
||||
@ -55,7 +55,7 @@ class Animator final {
|
||||
void EnqueueTraceFlowId(uint64_t trace_flow_id);
|
||||
|
||||
private:
|
||||
using LayerTreePipeline = Pipeline<flow::LayerTree>;
|
||||
using LayerTreePipeline = Pipeline<flutter::LayerTree>;
|
||||
|
||||
void BeginFrame(fml::TimePoint frame_start_time,
|
||||
fml::TimePoint frame_target_time);
|
||||
|
||||
@ -397,7 +397,7 @@ void Engine::ScheduleFrame(bool regenerate_layer_tree) {
|
||||
animator_->RequestFrame(regenerate_layer_tree);
|
||||
}
|
||||
|
||||
void Engine::Render(std::unique_ptr<flow::LayerTree> layer_tree) {
|
||||
void Engine::Render(std::unique_ptr<flutter::LayerTree> layer_tree) {
|
||||
if (!layer_tree)
|
||||
return;
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ class Engine final : public RuntimeDelegate {
|
||||
std::string DefaultRouteName() override;
|
||||
|
||||
// |RuntimeDelegate|
|
||||
void Render(std::unique_ptr<flow::LayerTree> layer_tree) override;
|
||||
void Render(std::unique_ptr<flutter::LayerTree> layer_tree) override;
|
||||
|
||||
// |RuntimeDelegate|
|
||||
void UpdateSemantics(SemanticsNodeUpdates update,
|
||||
|
||||
@ -102,7 +102,7 @@ void PlatformView::HandlePlatformMessage(fml::RefPtr<PlatformMessage> message) {
|
||||
|
||||
void PlatformView::OnPreEngineRestart() const {}
|
||||
|
||||
void PlatformView::RegisterTexture(std::shared_ptr<flow::Texture> texture) {
|
||||
void PlatformView::RegisterTexture(std::shared_ptr<flutter::Texture> texture) {
|
||||
delegate_.OnPlatformViewRegisterTexture(std::move(texture));
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ class PlatformView {
|
||||
virtual void OnPlatformViewSetAccessibilityFeatures(int32_t flags) = 0;
|
||||
|
||||
virtual void OnPlatformViewRegisterTexture(
|
||||
std::shared_ptr<flow::Texture> texture) = 0;
|
||||
std::shared_ptr<flutter::Texture> texture) = 0;
|
||||
|
||||
virtual void OnPlatformViewUnregisterTexture(int64_t texture_id) = 0;
|
||||
|
||||
@ -106,7 +106,7 @@ class PlatformView {
|
||||
void DispatchPointerDataPacket(std::unique_ptr<PointerDataPacket> packet);
|
||||
|
||||
// Called once per texture, on the platform thread.
|
||||
void RegisterTexture(std::shared_ptr<flow::Texture> texture);
|
||||
void RegisterTexture(std::shared_ptr<flutter::Texture> texture);
|
||||
|
||||
// Called once per texture, on the platform thread.
|
||||
void UnregisterTexture(int64_t texture_id);
|
||||
|
||||
@ -24,11 +24,11 @@ static constexpr std::chrono::milliseconds kSkiaCleanupExpiration(15000);
|
||||
|
||||
Rasterizer::Rasterizer(TaskRunners task_runners)
|
||||
: Rasterizer(std::move(task_runners),
|
||||
std::make_unique<flow::CompositorContext>()) {}
|
||||
std::make_unique<flutter::CompositorContext>()) {}
|
||||
|
||||
Rasterizer::Rasterizer(
|
||||
TaskRunners task_runners,
|
||||
std::unique_ptr<flow::CompositorContext> compositor_context)
|
||||
std::unique_ptr<flutter::CompositorContext> compositor_context)
|
||||
: task_runners_(std::move(task_runners)),
|
||||
compositor_context_(std::move(compositor_context)),
|
||||
weak_factory_(this) {
|
||||
@ -56,11 +56,11 @@ void Rasterizer::Teardown() {
|
||||
last_layer_tree_.reset();
|
||||
}
|
||||
|
||||
flow::TextureRegistry* Rasterizer::GetTextureRegistry() {
|
||||
flutter::TextureRegistry* Rasterizer::GetTextureRegistry() {
|
||||
return &compositor_context_->texture_registry();
|
||||
}
|
||||
|
||||
flow::LayerTree* Rasterizer::GetLastLayerTree() {
|
||||
flutter::LayerTree* Rasterizer::GetLastLayerTree() {
|
||||
return last_layer_tree_.get();
|
||||
}
|
||||
|
||||
@ -71,10 +71,10 @@ void Rasterizer::DrawLastLayerTree() {
|
||||
DrawToSurface(*last_layer_tree_);
|
||||
}
|
||||
|
||||
void Rasterizer::Draw(fml::RefPtr<Pipeline<flow::LayerTree>> pipeline) {
|
||||
void Rasterizer::Draw(fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline) {
|
||||
TRACE_EVENT0("flutter", "GPURasterizer::Draw");
|
||||
|
||||
Pipeline<flow::LayerTree>::Consumer consumer =
|
||||
Pipeline<flutter::LayerTree>::Consumer consumer =
|
||||
std::bind(&Rasterizer::DoDraw, this, std::placeholders::_1);
|
||||
|
||||
// Consume as many pipeline items as possible. But yield the event loop
|
||||
@ -146,7 +146,7 @@ sk_sp<SkImage> Rasterizer::MakeRasterSnapshot(sk_sp<SkPicture> picture,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Rasterizer::DoDraw(std::unique_ptr<flow::LayerTree> layer_tree) {
|
||||
void Rasterizer::DoDraw(std::unique_ptr<flutter::LayerTree> layer_tree) {
|
||||
if (!layer_tree || !surface_) {
|
||||
return;
|
||||
}
|
||||
@ -166,7 +166,7 @@ void Rasterizer::DoDraw(std::unique_ptr<flow::LayerTree> layer_tree) {
|
||||
}
|
||||
}
|
||||
|
||||
bool Rasterizer::DrawToSurface(flow::LayerTree& layer_tree) {
|
||||
bool Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) {
|
||||
FML_DCHECK(surface_);
|
||||
|
||||
auto frame = surface_->AcquireFrame(layer_tree.frame_size());
|
||||
@ -213,8 +213,8 @@ static sk_sp<SkData> SerializeTypeface(SkTypeface* typeface, void* ctx) {
|
||||
}
|
||||
|
||||
static sk_sp<SkData> ScreenshotLayerTreeAsPicture(
|
||||
flow::LayerTree* tree,
|
||||
flow::CompositorContext& compositor_context) {
|
||||
flutter::LayerTree* tree,
|
||||
flutter::CompositorContext& compositor_context) {
|
||||
FML_DCHECK(tree != nullptr);
|
||||
SkPictureRecorder recorder;
|
||||
recorder.beginRecording(
|
||||
@ -256,8 +256,8 @@ static sk_sp<SkSurface> CreateSnapshotSurface(GrContext* surface_context,
|
||||
}
|
||||
|
||||
static sk_sp<SkData> ScreenshotLayerTreeAsImage(
|
||||
flow::LayerTree* tree,
|
||||
flow::CompositorContext& compositor_context,
|
||||
flutter::LayerTree* tree,
|
||||
flutter::CompositorContext& compositor_context,
|
||||
GrContext* surface_context,
|
||||
bool compressed) {
|
||||
// Attempt to create a snapshot surface depending on whether we have access to
|
||||
|
||||
@ -24,7 +24,7 @@ class Rasterizer final : public SnapshotDelegate {
|
||||
Rasterizer(TaskRunners task_runners);
|
||||
|
||||
Rasterizer(TaskRunners task_runners,
|
||||
std::unique_ptr<flow::CompositorContext> compositor_context);
|
||||
std::unique_ptr<flutter::CompositorContext> compositor_context);
|
||||
|
||||
~Rasterizer();
|
||||
|
||||
@ -36,13 +36,13 @@ class Rasterizer final : public SnapshotDelegate {
|
||||
|
||||
fml::WeakPtr<SnapshotDelegate> GetSnapshotDelegate() const;
|
||||
|
||||
flow::LayerTree* GetLastLayerTree();
|
||||
flutter::LayerTree* GetLastLayerTree();
|
||||
|
||||
void DrawLastLayerTree();
|
||||
|
||||
flow::TextureRegistry* GetTextureRegistry();
|
||||
flutter::TextureRegistry* GetTextureRegistry();
|
||||
|
||||
void Draw(fml::RefPtr<Pipeline<flow::LayerTree>> pipeline);
|
||||
void Draw(fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline);
|
||||
|
||||
enum class ScreenshotType {
|
||||
SkiaPicture,
|
||||
@ -69,7 +69,7 @@ class Rasterizer final : public SnapshotDelegate {
|
||||
// the surface on the GPU task runner.
|
||||
void SetNextFrameCallback(fml::closure callback);
|
||||
|
||||
flow::CompositorContext* compositor_context() {
|
||||
flutter::CompositorContext* compositor_context() {
|
||||
return compositor_context_.get();
|
||||
}
|
||||
|
||||
@ -78,8 +78,8 @@ class Rasterizer final : public SnapshotDelegate {
|
||||
private:
|
||||
TaskRunners task_runners_;
|
||||
std::unique_ptr<Surface> surface_;
|
||||
std::unique_ptr<flow::CompositorContext> compositor_context_;
|
||||
std::unique_ptr<flow::LayerTree> last_layer_tree_;
|
||||
std::unique_ptr<flutter::CompositorContext> compositor_context_;
|
||||
std::unique_ptr<flutter::LayerTree> last_layer_tree_;
|
||||
fml::closure next_frame_callback_;
|
||||
fml::WeakPtrFactory<Rasterizer> weak_factory_;
|
||||
|
||||
@ -87,9 +87,9 @@ class Rasterizer final : public SnapshotDelegate {
|
||||
sk_sp<SkImage> MakeRasterSnapshot(sk_sp<SkPicture> picture,
|
||||
SkISize picture_size) override;
|
||||
|
||||
void DoDraw(std::unique_ptr<flow::LayerTree> layer_tree);
|
||||
void DoDraw(std::unique_ptr<flutter::LayerTree> layer_tree);
|
||||
|
||||
bool DrawToSurface(flow::LayerTree& layer_tree);
|
||||
bool DrawToSurface(flutter::LayerTree& layer_tree);
|
||||
|
||||
void FireNextFrameCallbackIfPresent();
|
||||
|
||||
|
||||
@ -674,7 +674,7 @@ void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) {
|
||||
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewRegisterTexture(
|
||||
std::shared_ptr<flow::Texture> texture) {
|
||||
std::shared_ptr<flutter::Texture> texture) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
|
||||
@ -768,7 +768,7 @@ void Shell::OnAnimatorNotifyIdle(int64_t deadline) {
|
||||
}
|
||||
|
||||
// |Animator::Delegate|
|
||||
void Shell::OnAnimatorDraw(fml::RefPtr<Pipeline<flow::LayerTree>> pipeline) {
|
||||
void Shell::OnAnimatorDraw(fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline) {
|
||||
FML_DCHECK(is_setup_);
|
||||
|
||||
task_runners_.GetGPUTaskRunner()->PostTask(
|
||||
|
||||
@ -151,7 +151,7 @@ class Shell final : public PlatformView::Delegate,
|
||||
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewRegisterTexture(
|
||||
std::shared_ptr<flow::Texture> texture) override;
|
||||
std::shared_ptr<flutter::Texture> texture) override;
|
||||
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewUnregisterTexture(int64_t texture_id) override;
|
||||
@ -169,7 +169,8 @@ class Shell final : public PlatformView::Delegate,
|
||||
void OnAnimatorNotifyIdle(int64_t deadline) override;
|
||||
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorDraw(fml::RefPtr<Pipeline<flow::LayerTree>> pipeline) override;
|
||||
void OnAnimatorDraw(
|
||||
fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline) override;
|
||||
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorDrawLastLayerTree() override;
|
||||
|
||||
@ -50,7 +50,7 @@ ShellIOManager::ShellIOManager(
|
||||
resource_context_ ? std::make_unique<fml::WeakPtrFactory<GrContext>>(
|
||||
resource_context_.get())
|
||||
: nullptr),
|
||||
unref_queue_(fml::MakeRefCounted<flow::SkiaUnrefQueue>(
|
||||
unref_queue_(fml::MakeRefCounted<flutter::SkiaUnrefQueue>(
|
||||
std::move(unref_queue_task_runner),
|
||||
fml::TimeDelta::FromMilliseconds(250))),
|
||||
weak_factory_(this) {
|
||||
@ -93,7 +93,7 @@ void ShellIOManager::UpdateResourceContext(sk_sp<GrContext> resource_context) {
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> ShellIOManager::GetSkiaUnrefQueue() const {
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> ShellIOManager::GetSkiaUnrefQueue() const {
|
||||
return unref_queue_;
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ class ShellIOManager final : public IOManager {
|
||||
// resource context, but may be called if the Dart VM is restarted.
|
||||
void UpdateResourceContext(sk_sp<GrContext> resource_context);
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const override;
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> GetSkiaUnrefQueue() const override;
|
||||
|
||||
fml::WeakPtr<ShellIOManager> GetWeakPtr();
|
||||
|
||||
@ -53,7 +53,7 @@ class ShellIOManager final : public IOManager {
|
||||
resource_context_weak_factory_;
|
||||
|
||||
// Unref queue management.
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue_;
|
||||
fml::RefPtr<flutter::SkiaUnrefQueue> unref_queue_;
|
||||
|
||||
fml::WeakPtrFactory<ShellIOManager> weak_factory_;
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ Surface::Surface() = default;
|
||||
|
||||
Surface::~Surface() = default;
|
||||
|
||||
flow::ExternalViewEmbedder* Surface::GetExternalViewEmbedder() {
|
||||
flutter::ExternalViewEmbedder* Surface::GetExternalViewEmbedder() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ class Surface {
|
||||
|
||||
virtual GrContext* GetContext() = 0;
|
||||
|
||||
virtual flow::ExternalViewEmbedder* GetExternalViewEmbedder();
|
||||
virtual flutter::ExternalViewEmbedder* GetExternalViewEmbedder();
|
||||
|
||||
virtual bool MakeRenderContextCurrent();
|
||||
|
||||
|
||||
@ -320,7 +320,7 @@ GrContext* GPUSurfaceGL::GetContext() {
|
||||
}
|
||||
|
||||
// |Surface|
|
||||
flow::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() {
|
||||
flutter::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() {
|
||||
return delegate_->GetExternalViewEmbedder();
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user