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

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

Issue 11360106: Browser Plugin: Implement AutoSize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 1 month 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 | Annotate | Revision Log
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 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 // the work that we will need to do. 1149 // the work that we will need to do.
1150 invalidation_task_posted_ = true; 1150 invalidation_task_posted_ = true;
1151 MessageLoop::current()->PostTask( 1151 MessageLoop::current()->PostTask(
1152 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); 1152 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this));
1153 } 1153 }
1154 1154
1155 void RenderWidget::didAutoResize(const WebSize& new_size) { 1155 void RenderWidget::didAutoResize(const WebSize& new_size) {
1156 if (size_.width() != new_size.width || size_.height() != new_size.height) { 1156 if (size_.width() != new_size.width || size_.height() != new_size.height) {
1157 size_ = new_size; 1157 size_ = new_size;
1158 need_update_rect_for_auto_resize_ = true; 1158 need_update_rect_for_auto_resize_ = true;
1159 // If we don't clear PaintAggregator after changing autoResize state, then
1160 // we might end up in a situation where bitmap_rect is larger than the
1161 // view_size. By clearing PaintAggregator, we ensure that we don't end up
1162 // with invalid damage rects.
1163 paint_aggregator_.ClearPendingUpdate();
1159 } 1164 }
1160 } 1165 }
1161 1166
1162 void RenderWidget::didActivateCompositor(int input_handler_identifier) { 1167 void RenderWidget::didActivateCompositor(int input_handler_identifier) {
1163 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); 1168 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
1164 1169
1165 #if !defined(OS_MACOSX) 1170 #if !defined(OS_MACOSX)
1166 if (!is_accelerated_compositing_active_) { 1171 if (!is_accelerated_compositing_active_) {
1167 // When not in accelerated compositing mode, in certain cases (e.g. waiting 1172 // When not in accelerated compositing mode, in certain cases (e.g. waiting
1168 // for a resize or if no backing store) the RenderWidgetHost is blocking the 1173 // for a resize or if no backing store) the RenderWidgetHost is blocking the
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 bool RenderWidget::WillHandleGestureEvent( 1927 bool RenderWidget::WillHandleGestureEvent(
1923 const WebKit::WebGestureEvent& event) { 1928 const WebKit::WebGestureEvent& event) {
1924 return false; 1929 return false;
1925 } 1930 }
1926 1931
1927 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1932 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1928 return false; 1933 return false;
1929 } 1934 }
1930 1935
1931 } // namespace content 1936 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698