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

Commit 81d246d

Browse files
committed
Move common graphics utils to //flutter/shell/common/graphics
This change creates a new source set //flutter/shell/common/graphics with minimal dependencies. The intention with this target is to be later consumed in a darwin common graphics target across the desktop boundary. Also unifies some of the graphics utilities under the same folder.
1 parent d14c4a7 commit 81d246d

Some content is hidden

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

49 files changed

+98
-60
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ FILE: ../../../flutter/flow/embedded_views.h
3333
FILE: ../../../flutter/flow/flow_run_all_unittests.cc
3434
FILE: ../../../flutter/flow/flow_test_utils.cc
3535
FILE: ../../../flutter/flow/flow_test_utils.h
36-
FILE: ../../../flutter/flow/gl_context_switch.cc
37-
FILE: ../../../flutter/flow/gl_context_switch.h
3836
FILE: ../../../flutter/flow/gl_context_switch_unittests.cc
3937
FILE: ../../../flutter/flow/instrumentation.cc
4038
FILE: ../../../flutter/flow/instrumentation.h
@@ -115,8 +113,6 @@ FILE: ../../../flutter/flow/surface.cc
115113
FILE: ../../../flutter/flow/surface.h
116114
FILE: ../../../flutter/flow/surface_frame.cc
117115
FILE: ../../../flutter/flow/surface_frame.h
118-
FILE: ../../../flutter/flow/texture.cc
119-
FILE: ../../../flutter/flow/texture.h
120116
FILE: ../../../flutter/flow/texture_unittests.cc
121117
FILE: ../../../flutter/flow/view_holder.cc
122118
FILE: ../../../flutter/flow/view_holder.h
@@ -619,9 +615,13 @@ FILE: ../../../flutter/shell/common/engine.h
619615
FILE: ../../../flutter/shell/common/engine_unittests.cc
620616
FILE: ../../../flutter/shell/common/fixtures/shell_test.dart
621617
FILE: ../../../flutter/shell/common/fixtures/shelltest_screenshot.png
618+
FILE: ../../../flutter/shell/common/graphics/gl_context_switch.cc
619+
FILE: ../../../flutter/shell/common/graphics/gl_context_switch.h
620+
FILE: ../../../flutter/shell/common/graphics/persistent_cache.cc
621+
FILE: ../../../flutter/shell/common/graphics/persistent_cache.h
622+
FILE: ../../../flutter/shell/common/graphics/texture.cc
623+
FILE: ../../../flutter/shell/common/graphics/texture.h
622624
FILE: ../../../flutter/shell/common/input_events_unittests.cc
623-
FILE: ../../../flutter/shell/common/persistent_cache.cc
624-
FILE: ../../../flutter/shell/common/persistent_cache.h
625625
FILE: ../../../flutter/shell/common/persistent_cache_unittests.cc
626626
FILE: ../../../flutter/shell/common/pipeline.cc
627627
FILE: ../../../flutter/shell/common/pipeline.h

flow/BUILD.gn

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ source_set("flow") {
1212
"compositor_context.h",
1313
"embedded_views.cc",
1414
"embedded_views.h",
15-
"gl_context_switch.cc",
16-
"gl_context_switch.h",
1715
"instrumentation.cc",
1816
"instrumentation.h",
1917
"layers/backdrop_filter_layer.cc",
@@ -66,15 +64,14 @@ source_set("flow") {
6664
"surface.h",
6765
"surface_frame.cc",
6866
"surface_frame.h",
69-
"texture.cc",
70-
"texture.h",
7167
]
7268

7369
public_configs = [ "//flutter:config" ]
7470

7571
deps = [
7672
"//flutter/common",
7773
"//flutter/fml",
74+
"//flutter/shell/common/graphics",
7875
"//third_party/skia",
7976
]
8077

@@ -124,7 +121,10 @@ if (enable_unittests) {
124121
"//third_party/googletest:gtest",
125122
]
126123

127-
deps = [ ":flow" ]
124+
deps = [
125+
":flow",
126+
"//flutter/shell/common/graphics",
127+
]
128128
}
129129

130130
executable("flow_unittests") {
@@ -168,6 +168,7 @@ if (enable_unittests) {
168168
":flow_fixtures",
169169
":flow_testing",
170170
"//flutter/fml",
171+
"//flutter/shell/common/graphics",
171172
"//flutter/testing:skia",
172173
"//flutter/testing:testing_lib",
173174
"//third_party/dart/runtime:libdart_jit", # for tracing

flow/compositor_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
#include "flutter/flow/embedded_views.h"
1212
#include "flutter/flow/instrumentation.h"
1313
#include "flutter/flow/raster_cache.h"
14-
#include "flutter/flow/texture.h"
1514
#include "flutter/fml/macros.h"
1615
#include "flutter/fml/raster_thread_merger.h"
16+
#include "flutter/shell/common/graphics/texture.h"
1717
#include "third_party/skia/include/core/SkCanvas.h"
1818
#include "third_party/skia/include/gpu/GrDirectContext.h"
1919

flow/gl_context_switch_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// found in the LICENSE file.
44
#define FML_USED_ON_EMBEDDER
55

6-
#include "flutter/flow/gl_context_switch.h"
6+
#include "flutter/shell/common/graphics/gl_context_switch.h"
77

88
#include <functional>
99
#include <future>

flow/layers/layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
#include "flutter/flow/embedded_views.h"
1212
#include "flutter/flow/instrumentation.h"
1313
#include "flutter/flow/raster_cache.h"
14-
#include "flutter/flow/texture.h"
1514
#include "flutter/fml/build_config.h"
1615
#include "flutter/fml/compiler_specific.h"
1716
#include "flutter/fml/logging.h"
1817
#include "flutter/fml/macros.h"
1918
#include "flutter/fml/trace_event.h"
19+
#include "flutter/shell/common/graphics/texture.h"
2020
#include "third_party/skia/include/core/SkCanvas.h"
2121
#include "third_party/skia/include/core/SkColor.h"
2222
#include "third_party/skia/include/core/SkColorFilter.h"

flow/layers/texture_layer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "flutter/flow/layers/texture_layer.h"
66

7-
#include "flutter/flow/texture.h"
7+
#include "flutter/shell/common/graphics/texture.h"
88

99
namespace flutter {
1010

flow/surface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <memory>
99

1010
#include "flutter/flow/embedded_views.h"
11-
#include "flutter/flow/gl_context_switch.h"
1211
#include "flutter/flow/surface_frame.h"
1312
#include "flutter/fml/macros.h"
13+
#include "flutter/shell/common/graphics/gl_context_switch.h"
1414

1515
namespace flutter {
1616

flow/surface_frame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#include <memory>
99

10-
#include "flutter/flow/gl_context_switch.h"
1110
#include "flutter/fml/macros.h"
11+
#include "flutter/shell/common/graphics/gl_context_switch.h"
1212
#include "third_party/skia/include/core/SkCanvas.h"
1313
#include "third_party/skia/include/core/SkSurface.h"
1414

flow/testing/gl_context_switch_test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef FLUTTER_SHELL_RENDERER_CONTEXT_TEST_H_
66
#define FLUTTER_SHELL_RENDERER_CONTEXT_TEST_H_
77

8-
#include "flutter/flow/gl_context_switch.h"
8+
#include "flutter/shell/common/graphics/gl_context_switch.h"
99
#include "gtest/gtest.h"
1010

1111
namespace flutter {

flow/testing/mock_texture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <ostream>
66
#include <vector>
77

8-
#include "flutter/flow/texture.h"
8+
#include "flutter/shell/common/graphics/texture.h"
99
#include "flutter/testing/assertions_skia.h"
1010

1111
namespace flutter {

0 commit comments

Comments
 (0)