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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 if (!is_accelerated_compositing_active_) { | 911 if (!is_accelerated_compositing_active_) { |
912 const size_t size = params.bitmap_rect.height() * | 912 const size_t size = params.bitmap_rect.height() * |
913 params.bitmap_rect.width() * 4; | 913 params.bitmap_rect.width() * 4; |
914 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); | 914 TransportDIB* dib = process_->GetTransportDIB(params.bitmap); |
915 | 915 |
916 // If gpu process does painting, scroll_rect and copy_rects are always empty | 916 // If gpu process does painting, scroll_rect and copy_rects are always empty |
917 // and backing store is never used. | 917 // and backing store is never used. |
918 if (dib) { | 918 if (dib) { |
919 if (dib->size() < size) { | 919 if (dib->size() < size) { |
920 DLOG(WARNING) << "Transport DIB too small for given rectangle"; | 920 DLOG(WARNING) << "Transport DIB too small for given rectangle"; |
921 UserMetrics::RecordAction(UserMetricsAction( | 921 UserMetrics::RecordAction( |
922 "BadMessageTerminate_RWH1")); | 922 UserMetricsAction("BadMessageTerminate_RWH1")); |
923 process()->ReceivedBadMessage(); | 923 process()->ReceivedBadMessage(); |
924 } else { | 924 } else { |
925 // Scroll the backing store. | 925 // Scroll the backing store. |
926 if (!params.scroll_rect.IsEmpty()) { | 926 if (!params.scroll_rect.IsEmpty()) { |
927 ScrollBackingStoreRect(params.dx, params.dy, | 927 ScrollBackingStoreRect(params.dx, params.dy, |
928 params.scroll_rect, | 928 params.scroll_rect, |
929 params.view_size); | 929 params.view_size); |
930 } | 930 } |
931 | 931 |
932 // Paint the backing store. This will update it with the | 932 // Paint the backing store. This will update it with the |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1207 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1208 #endif | 1208 #endif |
1209 } | 1209 } |
1210 | 1210 |
1211 deferred_plugin_handles_.clear(); | 1211 deferred_plugin_handles_.clear(); |
1212 } | 1212 } |
1213 | 1213 |
1214 void RenderWidgetHost::StartUserGesture() { | 1214 void RenderWidgetHost::StartUserGesture() { |
1215 OnUserGesture(); | 1215 OnUserGesture(); |
1216 } | 1216 } |
OLD | NEW |