This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit 1e6ebb3 1 parent e58764f commit 1e6ebb3 Copy full SHA for 1e6ebb3
File tree 9 files changed +6
-27
lines changed
9 files changed +6
-27
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,11 @@ CompositorContext::ScopedFrame::~ScopedFrame() {
58
58
}
59
59
60
60
void CompositorContext::OnGrContextCreated () {
61
- texture_registry_-> OnGrContextCreated ();
61
+ texture_registry_. OnGrContextCreated ();
62
62
}
63
63
64
64
void CompositorContext::OnGrContextDestroyed () {
65
- texture_registry_-> OnGrContextDestroyed ();
65
+ texture_registry_. OnGrContextDestroyed ();
66
66
raster_cache_.Clear ();
67
67
}
68
68
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class CompositorContext {
62
62
63
63
RasterCache& raster_cache () { return raster_cache_; }
64
64
65
- TextureRegistry& texture_registry () { return * texture_registry_; }
65
+ TextureRegistry& texture_registry () { return texture_registry_; }
66
66
67
67
const Counter& frame_count () const { return frame_count_; }
68
68
@@ -72,13 +72,9 @@ class CompositorContext {
72
72
73
73
const CounterValues& memory_usage () const { return memory_usage_; }
74
74
75
- void SetTextureRegistry (TextureRegistry* textureRegistry) {
76
- texture_registry_ = textureRegistry;
77
- }
78
-
79
75
private:
80
76
RasterCache raster_cache_;
81
- TextureRegistry* texture_registry_;
77
+ TextureRegistry texture_registry_;
82
78
std::unique_ptr<ProcessInfo> process_info_;
83
79
Counter frame_count_;
84
80
Stopwatch frame_time_;
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void NullRasterizer::DrawLastLayerTree() {
38
38
}
39
39
40
40
flow::TextureRegistry& NullRasterizer::GetTextureRegistry () {
41
- return * texture_registry_;
41
+ return texture_registry_;
42
42
}
43
43
44
44
void NullRasterizer::Clear (SkColor color, const SkISize& size) {
@@ -59,9 +59,4 @@ void NullRasterizer::AddNextFrameCallback(fxl::Closure nextFrameCallback) {
59
59
// Null rasterizer. Nothing to do.
60
60
}
61
61
62
- void NullRasterizer::SetTextureRegistry (
63
- flow::TextureRegistry* textureRegistry) {
64
- texture_registry_ = textureRegistry;
65
- }
66
-
67
62
} // namespace shell
Original file line number Diff line number Diff line change @@ -36,12 +36,10 @@ class NullRasterizer : public Rasterizer {
36
36
37
37
void AddNextFrameCallback (fxl::Closure nextFrameCallback) override ;
38
38
39
- void SetTextureRegistry (flow::TextureRegistry* textureRegistry) override ;
40
-
41
39
private:
42
40
std::unique_ptr<Surface> surface_;
43
41
fml::WeakPtrFactory<NullRasterizer> weak_factory_;
44
- flow::TextureRegistry* texture_registry_;
42
+ flow::TextureRegistry texture_registry_;
45
43
46
44
FXL_DISALLOW_COPY_AND_ASSIGN (NullRasterizer);
47
45
};
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ void PlatformView::SetRasterizer(std::unique_ptr<Rasterizer> rasterizer) {
35
35
Rasterizer* r = rasterizer_.release ();
36
36
blink::Threads::Gpu ()->PostTask ([r]() { delete r; });
37
37
rasterizer_ = std::move (rasterizer);
38
- rasterizer_->SetTextureRegistry (&texture_registry_);
39
38
engine_->set_rasterizer (rasterizer_->GetWeakRasterizerPtr ());
40
39
}
41
40
Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ class PlatformView : public std::enable_shared_from_this<PlatformView> {
90
90
91
91
SurfaceConfig surface_config_;
92
92
std::unique_ptr<Rasterizer> rasterizer_;
93
- flow::TextureRegistry texture_registry_;
94
93
std::unique_ptr<Engine> engine_;
95
94
std::unique_ptr<VsyncWaiter> vsync_waiter_;
96
95
SkISize size_;
Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ class Rasterizer {
42
42
43
43
// Set a callback to be called once when the next frame is drawn.
44
44
virtual void AddNextFrameCallback (fxl::Closure nextFrameCallback) = 0;
45
-
46
- virtual void SetTextureRegistry (flow::TextureRegistry* textureRegistry) = 0;
47
45
};
48
46
49
47
} // namespace shell
Original file line number Diff line number Diff line change @@ -161,8 +161,4 @@ void GPURasterizer::NotifyNextFrameOnce() {
161
161
}
162
162
}
163
163
164
- void GPURasterizer::SetTextureRegistry (flow::TextureRegistry* textureRegistry) {
165
- compositor_context_.SetTextureRegistry (std::move (textureRegistry));
166
- }
167
-
168
164
} // namespace shell
Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ class GPURasterizer : public Rasterizer {
42
42
// Set a callback to be called once when the next frame is drawn.
43
43
void AddNextFrameCallback (fxl::Closure nextFrameCallback) override ;
44
44
45
- void SetTextureRegistry (flow::TextureRegistry* textureRegistry) override ;
46
-
47
45
private:
48
46
std::unique_ptr<Surface> surface_;
49
47
flow::CompositorContext compositor_context_;
You can’t perform that action at this time.
0 commit comments