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

Unified Diff: content/renderer/render_widget.cc

Issue 15402010: When short-circuiting resize requests, keep track what the browser thinks the current size is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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') | no next file » | 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 521b3306ae5de6507c109096674df0c8ef2e8209..dddb3d3b7b3301d36ae5bac935aaf19f76a65410 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -410,8 +410,7 @@ void RenderWidget::Resize(const gfx::Size& new_size,
// Resize should have caused an invalidation of the entire view.
DCHECK(new_size.IsEmpty() || is_accelerated_compositing_active_ ||
paint_aggregator_.HasPendingUpdate());
- } else if (!RenderThreadImpl::current() || // Will be NULL during unit tests.
- !RenderThreadImpl::current()->short_circuit_size_updates()) {
+ } else if (size_browser_expects_ == new_size) {
resize_ack = NO_RESIZE_ACK;
}
@@ -469,6 +468,7 @@ void RenderWidget::OnResize(const gfx::Size& new_size,
bool is_fullscreen) {
Resize(new_size, physical_backing_size, overdraw_bottom_height, resizer_rect,
is_fullscreen, SEND_RESIZE_ACK);
+ size_browser_expects_ = new_size;
}
void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) {
@@ -538,6 +538,7 @@ void RenderWidget::OnUpdateRectAck() {
TRACE_EVENT0("renderer", "RenderWidget::OnUpdateRectAck");
DCHECK(update_reply_pending_);
update_reply_pending_ = false;
+ size_browser_expects_ = size_;
// If we sent an UpdateRect message with a zero-sized bitmap, then we should
// have no current paint buffer.
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698