| 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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 if (!view_) | 753 if (!view_) |
| 754 return NULL; | 754 return NULL; |
| 755 return view_->AllocBackingStore(size); | 755 return view_->AllocBackingStore(size); |
| 756 } | 756 } |
| 757 | 757 |
| 758 void RenderWidgetHostImpl::DonePaintingToBackingStore() { | 758 void RenderWidgetHostImpl::DonePaintingToBackingStore() { |
| 759 Send(new ViewMsg_UpdateRect_ACK(GetRoutingID())); | 759 Send(new ViewMsg_UpdateRect_ACK(GetRoutingID())); |
| 760 } | 760 } |
| 761 | 761 |
| 762 void RenderWidgetHostImpl::ScheduleComposite() { | 762 void RenderWidgetHostImpl::ScheduleComposite() { |
| 763 if (is_hidden_ || !is_accelerated_compositing_active_) { | 763 if (is_hidden_ || !is_accelerated_compositing_active_ || |
| 764 current_size_.IsEmpty()) { |
| 764 return; | 765 return; |
| 765 } | 766 } |
| 766 | 767 |
| 767 // Send out a request to the renderer to paint the view if required. | 768 // Send out a request to the renderer to paint the view if required. |
| 768 if (!repaint_ack_pending_ && !resize_ack_pending_ && !view_being_painted_) { | 769 if (!repaint_ack_pending_ && !resize_ack_pending_ && !view_being_painted_) { |
| 769 repaint_start_time_ = TimeTicks::Now(); | 770 repaint_start_time_ = TimeTicks::Now(); |
| 770 repaint_ack_pending_ = true; | 771 repaint_ack_pending_ = true; |
| 771 Send(new ViewMsg_Repaint(routing_id_, current_size_)); | 772 Send(new ViewMsg_Repaint(routing_id_, current_size_)); |
| 772 } | 773 } |
| 773 } | 774 } |
| (...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2465 return; | 2466 return; |
| 2466 | 2467 |
| 2467 OnRenderAutoResized(new_size); | 2468 OnRenderAutoResized(new_size); |
| 2468 } | 2469 } |
| 2469 | 2470 |
| 2470 void RenderWidgetHostImpl::DetachDelegate() { | 2471 void RenderWidgetHostImpl::DetachDelegate() { |
| 2471 delegate_ = NULL; | 2472 delegate_ = NULL; |
| 2472 } | 2473 } |
| 2473 | 2474 |
| 2474 } // namespace content | 2475 } // namespace content |
| OLD | NEW |