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 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 Send(new ViewMsg_WindowSnapshotCompleted( | 2443 Send(new ViewMsg_WindowSnapshotCompleted( |
2444 routing_id, snapshot_id, gfx::Size(), png_vector)); | 2444 routing_id, snapshot_id, gfx::Size(), png_vector)); |
2445 return; | 2445 return; |
2446 } | 2446 } |
2447 | 2447 |
2448 Send(new ViewMsg_WindowSnapshotCompleted( | 2448 Send(new ViewMsg_WindowSnapshotCompleted( |
2449 routing_id, snapshot_id, snapshot_size, png_data->data())); | 2449 routing_id, snapshot_id, snapshot_size, png_data->data())); |
2450 } | 2450 } |
2451 | 2451 |
2452 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { | 2452 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { |
2453 DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_UI)); | 2453 DCHECK(base::MessageLoopForUI::IsCurrent()); |
2454 | 2454 |
2455 std::vector<unsigned char> png; | 2455 std::vector<unsigned char> png; |
2456 | 2456 |
2457 // This feature is behind the kEnableGpuBenchmarking command line switch | 2457 // This feature is behind the kEnableGpuBenchmarking command line switch |
2458 // because it poses security concerns and should only be used for testing. | 2458 // because it poses security concerns and should only be used for testing. |
2459 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 2459 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
2460 if (!command_line.HasSwitch(switches::kEnableGpuBenchmarking)) { | 2460 if (!command_line.HasSwitch(switches::kEnableGpuBenchmarking)) { |
2461 Send(new ViewMsg_WindowSnapshotCompleted( | 2461 Send(new ViewMsg_WindowSnapshotCompleted( |
2462 GetRoutingID(), snapshot_id, gfx::Size(), png)); | 2462 GetRoutingID(), snapshot_id, gfx::Size(), png)); |
2463 return; | 2463 return; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2506 } | 2506 } |
2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); | 2507 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
2508 if (rwhi_set.insert(rwhi).second) | 2508 if (rwhi_set.insert(rwhi).second) |
2509 rwhi->FrameSwapped(latency_info[i]); | 2509 rwhi->FrameSwapped(latency_info[i]); |
2510 } | 2510 } |
2511 } | 2511 } |
2512 } | 2512 } |
2513 } | 2513 } |
2514 | 2514 |
2515 } // namespace content | 2515 } // namespace content |
OLD | NEW |