OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 // Perform updating asynchronously. This serves two purposes: | 917 // Perform updating asynchronously. This serves two purposes: |
918 // 1) Ensures that we call WebView::Paint without a bunch of other junk | 918 // 1) Ensures that we call WebView::Paint without a bunch of other junk |
919 // on the call stack. | 919 // on the call stack. |
920 // 2) Allows us to collect more damage rects before painting to help coalesce | 920 // 2) Allows us to collect more damage rects before painting to help coalesce |
921 // the work that we will need to do. | 921 // the work that we will need to do. |
922 invalidation_task_posted_ = true; | 922 invalidation_task_posted_ = true; |
923 MessageLoop::current()->PostTask( | 923 MessageLoop::current()->PostTask( |
924 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); | 924 FROM_HERE, base::Bind(&RenderWidget::InvalidationCallback, this)); |
925 } | 925 } |
926 | 926 |
| 927 void RenderWidget::didAutoResize(const WebSize& new_size) { |
| 928 size_ = new_size; |
| 929 } |
| 930 |
927 void RenderWidget::didActivateCompositor(int compositor_identifier) { | 931 void RenderWidget::didActivateCompositor(int compositor_identifier) { |
928 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); | 932 TRACE_EVENT0("gpu", "RenderWidget::didActivateCompositor"); |
929 | 933 |
930 CompositorThread* compositor_thread = | 934 CompositorThread* compositor_thread = |
931 RenderThreadImpl::current()->compositor_thread(); | 935 RenderThreadImpl::current()->compositor_thread(); |
932 if (compositor_thread) | 936 if (compositor_thread) |
933 compositor_thread->AddCompositor(routing_id_, compositor_identifier); | 937 compositor_thread->AddCompositor(routing_id_, compositor_identifier); |
934 | 938 |
935 is_accelerated_compositing_active_ = true; | 939 is_accelerated_compositing_active_ = true; |
936 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( | 940 Send(new ViewHostMsg_DidActivateAcceleratedCompositing( |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 } | 1488 } |
1485 } | 1489 } |
1486 | 1490 |
1487 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1491 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1488 return false; | 1492 return false; |
1489 } | 1493 } |
1490 | 1494 |
1491 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1495 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1492 return false; | 1496 return false; |
1493 } | 1497 } |
OLD | NEW |