| 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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 ResetSizeAndRepaintPendingFlags(); | 1200 ResetSizeAndRepaintPendingFlags(); |
| 1201 current_size_.SetSize(0, 0); | 1201 current_size_.SetSize(0, 0); |
| 1202 // After the renderer crashes, the view is destroyed and so the | 1202 // After the renderer crashes, the view is destroyed and so the |
| 1203 // RenderWidgetHost cannot track its visibility anymore. We assume such | 1203 // RenderWidgetHost cannot track its visibility anymore. We assume such |
| 1204 // RenderWidgetHost to be visible for the sake of internal accounting - be | 1204 // RenderWidgetHost to be visible for the sake of internal accounting - be |
| 1205 // careful about changing this - see http://crbug.com/401859. | 1205 // careful about changing this - see http://crbug.com/401859. |
| 1206 // | 1206 // |
| 1207 // We need to at least make sure that the RenderProcessHost is notified about | 1207 // We need to at least make sure that the RenderProcessHost is notified about |
| 1208 // the |is_hidden_| change, so that the renderer will have correct visibility | 1208 // the |is_hidden_| change, so that the renderer will have correct visibility |
| 1209 // set when respawned. | 1209 // set when respawned. |
| 1210 if (!is_hidden_) { | 1210 if (is_hidden_) { |
| 1211 process_->WidgetRestored(); | 1211 process_->WidgetRestored(); |
| 1212 is_hidden_ = false; | 1212 is_hidden_ = false; |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 // Reset this to ensure the hung renderer mechanism is working properly. | 1215 // Reset this to ensure the hung renderer mechanism is working properly. |
| 1216 in_flight_event_count_ = 0; | 1216 in_flight_event_count_ = 0; |
| 1217 | 1217 |
| 1218 if (view_) { | 1218 if (view_) { |
| 1219 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, | 1219 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, |
| 1220 gfx::GLSurfaceHandle()); | 1220 gfx::GLSurfaceHandle()); |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2317 } | 2317 } |
| 2318 #endif | 2318 #endif |
| 2319 | 2319 |
| 2320 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2320 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2321 if (view_) | 2321 if (view_) |
| 2322 return view_->PreferredReadbackFormat(); | 2322 return view_->PreferredReadbackFormat(); |
| 2323 return kN32_SkColorType; | 2323 return kN32_SkColorType; |
| 2324 } | 2324 } |
| 2325 | 2325 |
| 2326 } // namespace content | 2326 } // namespace content |
| OLD | NEW |