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

Unified Diff: content/renderer/render_widget.cc

Issue 447133002: Revert of Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « content/renderer/render_widget.h ('k') | content/shell/renderer/test_runner/web_test_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 4f379cf919f5a8744a2d4a2e92d8c6c6afeb5b32..226512fe99098a679626e525a884d1511b7fd483 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -393,7 +393,6 @@
handling_event_type_(WebInputEvent::Undefined),
ignore_ack_for_mouse_move_from_debugger_(false),
closing_(false),
- host_closing_(false),
is_swapped_out_(swapped_out),
input_method_is_active_(false),
text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
@@ -1197,8 +1196,6 @@
}
void RenderWidget::initializeLayerTreeView() {
- DCHECK(!host_closing_);
-
compositor_ =
RenderWidgetCompositor::Create(this, IsThreadedCompositingEnabled());
compositor_->setViewportSize(size_, physical_backing_size_);
@@ -1206,19 +1203,19 @@
StartCompositor();
}
-void RenderWidget::DestroyLayerTreeView() {
- // Always send this notification to prevent new layer tree views from
- // being created, even if one hasn't been created yet.
- webwidget_->willCloseLayerTreeView();
- compositor_.reset();
-}
-
blink::WebLayerTreeView* RenderWidget::layerTreeView() {
return compositor_.get();
}
+void RenderWidget::suppressCompositorScheduling(bool enable) {
+ if (compositor_)
+ compositor_->SetSuppressScheduleComposite(enable);
+}
+
void RenderWidget::willBeginCompositorFrame() {
TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame");
+
+ DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get());
// The following two can result in further layout and possibly
// enable GPU acceleration so they need to be called before any painting
@@ -1376,12 +1373,6 @@
}
void RenderWidget::DoDeferredClose() {
- // No more compositing is possible. This prevents shutdown races between
- // previously posted CreateOutputSurface tasks and the host being unable to
- // create them because the close message was handled.
- DestroyLayerTreeView();
- // Also prevent new compositors from being created.
- host_closing_ = true;
Send(new ViewHostMsg_Close(routing_id_));
}
@@ -1422,7 +1413,8 @@
void RenderWidget::Close() {
screen_metrics_emulator_.reset();
if (webwidget_) {
- DestroyLayerTreeView();
+ webwidget_->willCloseLayerTreeView();
+ compositor_.reset();
webwidget_->close();
webwidget_ = NULL;
}
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/shell/renderer/test_runner/web_test_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698