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

Side by Side Diff: content/renderer/render_widget.cc

Issue 12463007: Disable partial swaps for webview guest renderer until we can figure out how to do that properly. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 surface_id_(0), 132 surface_id_(0),
133 webwidget_(NULL), 133 webwidget_(NULL),
134 opener_id_(MSG_ROUTING_NONE), 134 opener_id_(MSG_ROUTING_NONE),
135 init_complete_(false), 135 init_complete_(false),
136 current_paint_buf_(NULL), 136 current_paint_buf_(NULL),
137 next_paint_flags_(0), 137 next_paint_flags_(0),
138 filtered_time_per_frame_(0.0f), 138 filtered_time_per_frame_(0.0f),
139 update_reply_pending_(false), 139 update_reply_pending_(false),
140 need_update_rect_for_auto_resize_(false), 140 need_update_rect_for_auto_resize_(false),
141 using_asynchronous_swapbuffers_(false), 141 using_asynchronous_swapbuffers_(false),
142 allow_partial_swap_(true),
142 num_swapbuffers_complete_pending_(0), 143 num_swapbuffers_complete_pending_(0),
143 did_show_(false), 144 did_show_(false),
144 is_hidden_(false), 145 is_hidden_(false),
145 is_fullscreen_(false), 146 is_fullscreen_(false),
146 needs_repainting_on_restore_(false), 147 needs_repainting_on_restore_(false),
147 has_focus_(false), 148 has_focus_(false),
148 handling_input_event_(false), 149 handling_input_event_(false),
149 handling_ime_event_(false), 150 handling_ime_event_(false),
150 closing_(false), 151 closing_(false),
151 is_swapped_out_(swapped_out), 152 is_swapped_out_(swapped_out),
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 // DoDeferredUpdate() is bypassed and WebKit is responsible for exiting and 1342 // DoDeferredUpdate() is bypassed and WebKit is responsible for exiting and
1342 // entering force compositing mode at the appropriate times. 1343 // entering force compositing mode at the appropriate times.
1343 if (!is_threaded_compositing_enabled_) 1344 if (!is_threaded_compositing_enabled_)
1344 webwidget_->enterForceCompositingMode(false); 1345 webwidget_->enterForceCompositingMode(false);
1345 } 1346 }
1346 1347
1347 void RenderWidget::initializeLayerTreeView( 1348 void RenderWidget::initializeLayerTreeView(
1348 WebKit::WebLayerTreeViewClient* client, 1349 WebKit::WebLayerTreeViewClient* client,
1349 const WebKit::WebLayer& root_layer, 1350 const WebKit::WebLayer& root_layer,
1350 const WebKit::WebLayerTreeView::Settings& settings) { 1351 const WebKit::WebLayerTreeView::Settings& settings) {
1351 compositor_ = RenderWidgetCompositor::Create(this, client, settings); 1352 WebKit::WebLayerTreeView::Settings override_settings = settings;
1353 override_settings.partialSwapEnabled = allow_partial_swap_;
jamesr 2013/03/06 19:30:28 Yuck yuck yuck! RenderWidgetCompositor has a Rend
alexst (slow to review) 2013/03/06 20:34:07 This seemed like a related field in the struct, I
1354 compositor_ = RenderWidgetCompositor::Create(this,
1355 client,
1356 override_settings);
1352 if (!compositor_) 1357 if (!compositor_)
1353 return; 1358 return;
1354 1359
1355 compositor_->setRootLayer(root_layer); 1360 compositor_->setRootLayer(root_layer);
1356 compositor_->setViewportSize(size_, physical_backing_size_); 1361 compositor_->setViewportSize(size_, physical_backing_size_);
1357 if (init_complete_) 1362 if (init_complete_)
1358 compositor_->setSurfaceReady(); 1363 compositor_->setSurfaceReady();
1359 } 1364 }
1360 1365
1361 WebKit::WebLayerTreeView* RenderWidget::layerTreeView() { 1366 WebKit::WebLayerTreeView* RenderWidget::layerTreeView() {
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 bool RenderWidget::WillHandleGestureEvent( 2160 bool RenderWidget::WillHandleGestureEvent(
2156 const WebKit::WebGestureEvent& event) { 2161 const WebKit::WebGestureEvent& event) {
2157 return false; 2162 return false;
2158 } 2163 }
2159 2164
2160 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2165 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2161 return true; 2166 return true;
2162 } 2167 }
2163 2168
2164 } // namespace content 2169 } // namespace content
OLDNEW
« content/renderer/gpu/render_widget_compositor.cc ('K') | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698