Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: services/ui/ws/frame_generator.cc

Issue 2683553004: Cleanup ServerWindowCompositorFrameSinkManager and FrameGenerator (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/frame_generator.h ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index 524a497fb813ff8eb3605e26a1b1d21683c8f955..4a7809f0adcbc91673f17ed352265627926b68e5 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -26,8 +26,7 @@ FrameGenerator::FrameGenerator(FrameGeneratorDelegate* delegate,
ServerWindow* root_window)
: delegate_(delegate),
root_window_(root_window),
- binding_(this),
- weak_factory_(this) {
+ binding_(this) {
DCHECK(delegate_);
}
@@ -40,9 +39,6 @@ void FrameGenerator::SetDeviceScaleFactor(float device_scale_factor) {
}
FrameGenerator::~FrameGenerator() {
- // Invalidate WeakPtrs now to avoid callbacks back into the
- // FrameGenerator during destruction of |compositor_frame_sink_|.
- weak_factory_.InvalidateWeakPtrs();
compositor_frame_sink_.reset();
}
@@ -107,6 +103,7 @@ void FrameGenerator::ReclaimResources(
const cc::ReturnedResourceArray& resources) {
// Nothing to do here because FrameGenerator CompositorFrames don't reference
// any resources.
+ DCHECK(resources.empty());
}
void FrameGenerator::WillDrawSurface() {
« no previous file with comments | « services/ui/ws/frame_generator.h ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698