Skip to content

Commit 73b14a9

Browse files
dnfieldlicheng
authored andcommitted
Align fuchsia and non-fuchsia tracing (flutter#9199)
1 parent 0c15cdf commit 73b14a9

Some content is hidden

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

61 files changed

+207
-227
lines changed

assets/asset_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ std::unique_ptr<fml::Mapping> AssetManager::GetAsMapping(
3535
if (asset_name.size() == 0) {
3636
return nullptr;
3737
}
38-
TRACE_EVENT1("flutter", "AssetManager::GetAsMapping", "name",
39-
asset_name.c_str());
38+
FML_TRACE_EVENT1("flutter", "AssetManager::GetAsMapping", "name",
39+
asset_name.c_str());
4040
for (const auto& resolver : resolvers_) {
4141
auto mapping = resolver->GetAsMapping(asset_name);
4242
if (mapping != nullptr) {

assets/zip_asset_store.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ bool ZipAssetStore::IsValid() const {
4141
// |AssetResolver|
4242
std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
4343
const std::string& asset_name) const {
44-
TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
45-
asset_name.c_str());
44+
FML_TRACE_EVENT1("flutter", "ZipAssetStore::GetAsMapping", "name",
45+
asset_name.c_str());
4646

4747
auto found = stat_cache_.find(directory_ + "/" + asset_name);
4848
if (found == stat_cache_.end()) {
@@ -84,7 +84,7 @@ std::unique_ptr<fml::Mapping> ZipAssetStore::GetAsMapping(
8484
}
8585

8686
void ZipAssetStore::BuildStatCache() {
87-
TRACE_EVENT0("flutter", "ZipAssetStore::BuildStatCache");
87+
FML_TRACE_EVENT0("flutter", "ZipAssetStore::BuildStatCache");
8888

8989
auto unzipper = CreateUnzipper();
9090

flow/layers/backdrop_filter_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BackdropFilterLayer::BackdropFilterLayer() = default;
1111
BackdropFilterLayer::~BackdropFilterLayer() = default;
1212

1313
void BackdropFilterLayer::Paint(PaintContext& context) const {
14-
TRACE_EVENT0("flutter", "BackdropFilterLayer::Paint");
14+
FML_TRACE_EVENT0("flutter", "BackdropFilterLayer::Paint");
1515
FML_DCHECK(needs_painting());
1616

1717
Layer::AutoSaveLayer save = Layer::AutoSaveLayer::Create(

flow/layers/clip_path_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void ClipPathLayer::UpdateScene(SceneUpdateContext& context) {
5454
#endif // defined(OS_FUCHSIA)
5555

5656
void ClipPathLayer::Paint(PaintContext& context) const {
57-
TRACE_EVENT0("flutter", "ClipPathLayer::Paint");
57+
FML_TRACE_EVENT0("flutter", "ClipPathLayer::Paint");
5858
FML_DCHECK(needs_painting());
5959

6060
SkAutoCanvasRestore save(context.internal_nodes_canvas, true);

flow/layers/clip_rect_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void ClipRectLayer::UpdateScene(SceneUpdateContext& context) {
4444
#endif // defined(OS_FUCHSIA)
4545

4646
void ClipRectLayer::Paint(PaintContext& context) const {
47-
TRACE_EVENT0("flutter", "ClipRectLayer::Paint");
47+
FML_TRACE_EVENT0("flutter", "ClipRectLayer::Paint");
4848
FML_DCHECK(needs_painting());
4949

5050
SkAutoCanvasRestore save(context.internal_nodes_canvas, true);

flow/layers/clip_rrect_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void ClipRRectLayer::UpdateScene(SceneUpdateContext& context) {
5252
#endif // defined(OS_FUCHSIA)
5353

5454
void ClipRRectLayer::Paint(PaintContext& context) const {
55-
TRACE_EVENT0("flutter", "ClipRRectLayer::Paint");
55+
FML_TRACE_EVENT0("flutter", "ClipRRectLayer::Paint");
5656
FML_DCHECK(needs_painting());
5757

5858
SkAutoCanvasRestore save(context.internal_nodes_canvas, true);

flow/layers/color_filter_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ColorFilterLayer::ColorFilterLayer() = default;
1111
ColorFilterLayer::~ColorFilterLayer() = default;
1212

1313
void ColorFilterLayer::Paint(PaintContext& context) const {
14-
TRACE_EVENT0("flutter", "ColorFilterLayer::Paint");
14+
FML_TRACE_EVENT0("flutter", "ColorFilterLayer::Paint");
1515
FML_DCHECK(needs_painting());
1616

1717
SkPaint paint;

flow/layers/container_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void ContainerLayer::Add(std::shared_ptr<Layer> layer) {
1616
}
1717

1818
void ContainerLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
19-
TRACE_EVENT0("flutter", "ContainerLayer::Preroll");
19+
FML_TRACE_EVENT0("flutter", "ContainerLayer::Preroll");
2020

2121
SkRect child_paint_bounds = SkRect::MakeEmpty();
2222
PrerollChildren(context, matrix, &child_paint_bounds);

flow/layers/layer_tree.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ LayerTree::~LayerTree() = default;
2121

2222
void LayerTree::Preroll(CompositorContext::ScopedFrame& frame,
2323
bool ignore_raster_cache) {
24-
TRACE_EVENT0("flutter", "LayerTree::Preroll");
24+
FML_TRACE_EVENT0("flutter", "LayerTree::Preroll");
2525
SkColorSpace* color_space =
2626
frame.canvas() ? frame.canvas()->imageInfo().colorSpace() : nullptr;
2727
frame.context().raster_cache().SetCheckboardCacheImages(
@@ -43,7 +43,7 @@ void LayerTree::Preroll(CompositorContext::ScopedFrame& frame,
4343
#if defined(OS_FUCHSIA)
4444
void LayerTree::UpdateScene(SceneUpdateContext& context,
4545
scenic::ContainerNode& container) {
46-
TRACE_EVENT0("flutter", "LayerTree::UpdateScene");
46+
FML_TRACE_EVENT0("flutter", "LayerTree::UpdateScene");
4747
const auto& metrics = context.metrics();
4848
SceneUpdateContext::Transform transform(context, // context
4949
1.0f / metrics->scale_x, // X
@@ -67,7 +67,7 @@ void LayerTree::UpdateScene(SceneUpdateContext& context,
6767

6868
void LayerTree::Paint(CompositorContext::ScopedFrame& frame,
6969
bool ignore_raster_cache) const {
70-
TRACE_EVENT0("flutter", "LayerTree::Paint");
70+
FML_TRACE_EVENT0("flutter", "LayerTree::Paint");
7171
SkISize canvas_size = frame.canvas()->getBaseLayerSize();
7272
SkNWayCanvas internal_nodes_canvas(canvas_size.width(), canvas_size.height());
7373
internal_nodes_canvas.addCanvas(frame.canvas());
@@ -94,7 +94,7 @@ void LayerTree::Paint(CompositorContext::ScopedFrame& frame,
9494
}
9595

9696
sk_sp<SkPicture> LayerTree::Flatten(const SkRect& bounds) {
97-
TRACE_EVENT0("flutter", "LayerTree::Flatten");
97+
FML_TRACE_EVENT0("flutter", "LayerTree::Flatten");
9898

9999
SkPictureRecorder recorder;
100100
auto* canvas = recorder.beginRecording(bounds);

flow/layers/opacity_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void OpacityLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
5454
}
5555

5656
void OpacityLayer::Paint(PaintContext& context) const {
57-
TRACE_EVENT0("flutter", "OpacityLayer::Paint");
57+
FML_TRACE_EVENT0("flutter", "OpacityLayer::Paint");
5858
FML_DCHECK(needs_painting());
5959

6060
SkPaint paint;

0 commit comments

Comments
 (0)