| 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/browser/renderer_host/render_widget_host.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.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/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 if (!is_accelerated_compositing_active_) { | 906 if (!is_accelerated_compositing_active_) { |
| 907 const size_t size = params.bitmap_rect.height() * | 907 const size_t size = params.bitmap_rect.height() * |
| 908 params.bitmap_rect.width() * 4; | 908 params.bitmap_rect.width() * 4; |
| 909 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); | 909 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); |
| 910 | 910 |
| 911 // If gpu process does painting, scroll_rect and copy_rects are always empty | 911 // If gpu process does painting, scroll_rect and copy_rects are always empty |
| 912 // and backing store is never used. | 912 // and backing store is never used. |
| 913 if (dib) { | 913 if (dib) { |
| 914 if (dib->size() < size) { | 914 if (dib->size() < size) { |
| 915 DLOG(WARNING) << "Transport DIB too small for given rectangle"; | 915 DLOG(WARNING) << "Transport DIB too small for given rectangle"; |
| 916 UserMetrics::RecordAction(UserMetricsAction( | 916 UserMetrics::RecordAction( |
| 917 "BadMessageTerminate_RWH1")); | 917 UserMetricsAction("BadMessageTerminate_RWH1")); |
| 918 process()->ReceivedBadMessage(); | 918 process()->ReceivedBadMessage(); |
| 919 } else { | 919 } else { |
| 920 // Scroll the backing store. | 920 // Scroll the backing store. |
| 921 if (!params.scroll_rect.IsEmpty()) { | 921 if (!params.scroll_rect.IsEmpty()) { |
| 922 ScrollBackingStoreRect(params.dx, params.dy, | 922 ScrollBackingStoreRect(params.dx, params.dy, |
| 923 params.scroll_rect, | 923 params.scroll_rect, |
| 924 params.view_size); | 924 params.view_size); |
| 925 } | 925 } |
| 926 | 926 |
| 927 // Paint the backing store. This will update it with the | 927 // Paint the backing store. This will update it with the |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1203 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
| 1204 #endif | 1204 #endif |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 deferred_plugin_handles_.clear(); | 1207 deferred_plugin_handles_.clear(); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 void RenderWidgetHost::StartUserGesture() { | 1210 void RenderWidgetHost::StartUserGesture() { |
| 1211 OnUserGesture(); | 1211 OnUserGesture(); |
| 1212 } | 1212 } |
| OLD | NEW |