Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
../../../flutter/flow/flow_run_all_unittests.cc
../../../flutter/flow/frame_timings_recorder_unittests.cc
../../../flutter/flow/gl_context_switch_unittests.cc
../../../flutter/flow/instrumentation_unittests.cc
../../../flutter/flow/layers/backdrop_filter_layer_unittests.cc
../../../flutter/flow/layers/checkerboard_layertree_unittests.cc
../../../flutter/flow/layers/clip_path_layer_unittests.cc
Expand All @@ -75,6 +74,7 @@
../../../flutter/flow/mutators_stack_unittests.cc
../../../flutter/flow/raster_cache_unittests.cc
../../../flutter/flow/skia_gpu_object_unittests.cc
../../../flutter/flow/stopwatch_unittests.cc
../../../flutter/flow/surface_frame_unittests.cc
../../../flutter/flow/testing
../../../flutter/flow/texture_unittests.cc
Expand Down
8 changes: 4 additions & 4 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@ ORIGIN: ../../../flutter/flow/flow_test_utils.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/flow_test_utils.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/frame_timings.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/frame_timings.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/instrumentation.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/instrumentation.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/layer_snapshot_store.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/layer_snapshot_store.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/layers/backdrop_filter_layer.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -846,6 +844,8 @@ ORIGIN: ../../../flutter/flow/raster_cache_key.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/raster_cache_util.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/raster_cache_util.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/skia_gpu_object.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/stopwatch.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/stopwatch.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/surface.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/surface.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/flow/surface_frame.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -3532,8 +3532,6 @@ FILE: ../../../flutter/flow/flow_test_utils.cc
FILE: ../../../flutter/flow/flow_test_utils.h
FILE: ../../../flutter/flow/frame_timings.cc
FILE: ../../../flutter/flow/frame_timings.h
FILE: ../../../flutter/flow/instrumentation.cc
FILE: ../../../flutter/flow/instrumentation.h
FILE: ../../../flutter/flow/layer_snapshot_store.cc
FILE: ../../../flutter/flow/layer_snapshot_store.h
FILE: ../../../flutter/flow/layers/backdrop_filter_layer.cc
Expand Down Expand Up @@ -3591,6 +3589,8 @@ FILE: ../../../flutter/flow/raster_cache_key.h
FILE: ../../../flutter/flow/raster_cache_util.cc
FILE: ../../../flutter/flow/raster_cache_util.h
FILE: ../../../flutter/flow/skia_gpu_object.h
FILE: ../../../flutter/flow/stopwatch.cc
FILE: ../../../flutter/flow/stopwatch.h
FILE: ../../../flutter/flow/surface.cc
FILE: ../../../flutter/flow/surface.h
FILE: ../../../flutter/flow/surface_frame.cc
Expand Down
6 changes: 3 additions & 3 deletions flow/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ source_set("flow") {
"embedded_views.h",
"frame_timings.cc",
"frame_timings.h",
"instrumentation.cc",
"instrumentation.h",
"layer_snapshot_store.cc",
"layer_snapshot_store.h",
"layers/backdrop_filter_layer.cc",
Expand Down Expand Up @@ -77,6 +75,8 @@ source_set("flow") {
"raster_cache_util.cc",
"raster_cache_util.h",
"skia_gpu_object.h",
"stopwatch.cc",
"stopwatch.h",
"surface.cc",
"surface.h",
"surface_frame.cc",
Expand Down Expand Up @@ -145,7 +145,6 @@ if (enable_unittests) {
"flow_test_utils.h",
"frame_timings_recorder_unittests.cc",
"gl_context_switch_unittests.cc",
"instrumentation_unittests.cc",
"layers/backdrop_filter_layer_unittests.cc",
"layers/checkerboard_layertree_unittests.cc",
"layers/clip_path_layer_unittests.cc",
Expand All @@ -167,6 +166,7 @@ if (enable_unittests) {
"mutators_stack_unittests.cc",
"raster_cache_unittests.cc",
"skia_gpu_object_unittests.cc",
"stopwatch_unittests.cc",
"surface_frame_unittests.cc",
"testing/mock_layer_unittests.cc",
"testing/mock_texture_unittests.cc",
Expand Down
2 changes: 1 addition & 1 deletion flow/compositor_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include "flutter/common/graphics/texture.h"
#include "flutter/flow/diff_context.h"
#include "flutter/flow/embedded_views.h"
#include "flutter/flow/instrumentation.h"
#include "flutter/flow/layer_snapshot_store.h"
#include "flutter/flow/raster_cache.h"
#include "flutter/flow/stopwatch.h"
#include "flutter/fml/macros.h"
#include "flutter/fml/raster_thread_merger.h"
#include "third_party/skia/include/core/SkCanvas.h"
Expand Down
2 changes: 1 addition & 1 deletion flow/layers/layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include "flutter/display_list/dl_canvas.h"
#include "flutter/flow/diff_context.h"
#include "flutter/flow/embedded_views.h"
#include "flutter/flow/instrumentation.h"
#include "flutter/flow/layer_snapshot_store.h"
#include "flutter/flow/layers/layer_state_stack.h"
#include "flutter/flow/raster_cache.h"
#include "flutter/flow/stopwatch.h"
#include "flutter/fml/build_config.h"
#include "flutter/fml/compiler_specific.h"
#include "flutter/fml/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion flow/layers/performance_overlay_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <string>

#include "flutter/flow/instrumentation.h"
#include "flutter/flow/layers/layer.h"
#include "flutter/flow/stopwatch.h"
#include "flutter/fml/macros.h"

class SkTextBlob;
Expand Down
6 changes: 2 additions & 4 deletions flow/instrumentation.cc → flow/stopwatch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/flow/instrumentation.h"
#include "flutter/flow/stopwatch.h"

#include <algorithm>

#include "flutter/display_list/skia/dl_sk_canvas.h"
#include "include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkSurface.h"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "flutter/flow/instrumentation.h"
#include "gmock/gmock.h"
#include "flutter/flow/stopwatch.h"
#include "gmock/gmock.h" // IWYU pragma: keep
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnfield was the issue that IWYU didnt understand all of the gn options and so tests didn't work well with it?

Anyway, unsure if we want to start adding IWYU pragmas until we understand how many we'd need

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. This was more of a "hmm, what's going on here".

From my understanding, gmock specifically needs a pragma (I see the Chromium codebase doing the same thing).

I'm going to merge, but if we end up wanting to remove this I have no qualms.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its its only for gmock and only for a few places I think thats fine. I just dont want IWYU pragmas on half of our includes 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. I'll run that experiment later this week to see how bad it would be.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we're using IWYU , are we?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was asking about the previous issue with trying to use IWYU that you mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I can't remember why now, I think there was some challenge getting it set up to run period, not so much with these details. Apparently there's a clangtidy proposal for it too.

#include "gtest/gtest.h"

using testing::Return;
Expand Down