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

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: Reupload 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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // the work that we will need to do. 1146 // the work that we will need to do.
1147 invalidation_task_posted_ = true; 1147 invalidation_task_posted_ = true;
1148 MessageLoop::current()->PostTask( 1148 MessageLoop::current()->PostTask(
1149 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); 1149 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this));
1150 } 1150 }
1151 1151
1152 void RenderWidget::didAutoResize(const WebSize& new_size) { 1152 void RenderWidget::didAutoResize(const WebSize& new_size) {
1153 if (size_.width() != new_size.width || size_.height() != new_size.height) { 1153 if (size_.width() != new_size.width || size_.height() != new_size.height) {
1154 size_ = new_size; 1154 size_ = new_size;
1155 need_update_rect_for_auto_resize_ = true; 1155 need_update_rect_for_auto_resize_ = true;
1156 // If we don't clear PaintAggregator after changing autoResize state, then
1157 // we might end up in a situation where bitmap_rect is larger than the
1158 // view_size. By clearing PaintAggregator, we ensure that we don't end up
1159 // with invalid damage rects.
1160 paint_aggregator_.ClearPendingUpdate();
1156 } 1161 }
1157 } 1162 }
1158 1163
1159 void RenderWidget::didActivateCompositor(int input_handler_identifier) { 1164 void RenderWidget::didActivateCompositor(int input_handler_identifier) {
1160 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); 1165 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor");
1161 1166
1162 #if !defined(OS_MACOSX) 1167 #if !defined(OS_MACOSX)
1163 if (!is_accelerated_compositing_active_) { 1168 if (!is_accelerated_compositing_active_) {
1164 // When not in accelerated compositing mode, in certain cases (e.g. waiting 1169 // When not in accelerated compositing mode, in certain cases (e.g. waiting
1165 // for a resize or if no backing store) the RenderWidgetHost is blocking the 1170 // for a resize or if no backing store) the RenderWidgetHost is blocking the
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 1926
1922 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { 1927 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
1923 return false; 1928 return false;
1924 } 1929 }
1925 1930
1926 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { 1931 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const {
1927 return false; 1932 return false;
1928 } 1933 }
1929 1934
1930 } // namespace content 1935 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698