| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |