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 // Implementation notes: This needs to work on a variety of hardware | 5 // Implementation notes: This needs to work on a variety of hardware |
6 // configurations where the speed of the CPU and GPU greatly affect overall | 6 // configurations where the speed of the CPU and GPU greatly affect overall |
7 // performance. Spanning several threads, the process of capturing has been | 7 // performance. Spanning several threads, the process of capturing has been |
8 // split up into four conceptual stages: | 8 // split up into four conceptual stages: |
9 // | 9 // |
10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's | 10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the consumer's |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "base/basictypes.h" | 57 #include "base/basictypes.h" |
58 #include "base/bind.h" | 58 #include "base/bind.h" |
59 #include "base/bind_helpers.h" | 59 #include "base/bind_helpers.h" |
60 #include "base/callback_forward.h" | 60 #include "base/callback_forward.h" |
61 #include "base/debug/trace_event.h" | 61 #include "base/debug/trace_event.h" |
62 #include "base/logging.h" | 62 #include "base/logging.h" |
63 #include "base/memory/scoped_ptr.h" | 63 #include "base/memory/scoped_ptr.h" |
64 #include "base/memory/weak_ptr.h" | 64 #include "base/memory/weak_ptr.h" |
65 #include "base/message_loop_proxy.h" | 65 #include "base/message_loop_proxy.h" |
66 #include "base/metrics/histogram.h" | 66 #include "base/metrics/histogram.h" |
| 67 #include "base/sequenced_task_runner.h" |
67 #include "base/stringprintf.h" | 68 #include "base/stringprintf.h" |
68 #include "base/synchronization/lock.h" | 69 #include "base/synchronization/lock.h" |
69 #include "base/task/sequenced_task_runner.h" | |
70 #include "base/threading/thread.h" | 70 #include "base/threading/thread.h" |
71 #include "base/threading/thread_checker.h" | 71 #include "base/threading/thread_checker.h" |
72 #include "base/time.h" | 72 #include "base/time.h" |
73 #include "content/browser/renderer_host/media/web_contents_capture_util.h" | 73 #include "content/browser/renderer_host/media/web_contents_capture_util.h" |
74 #include "content/browser/renderer_host/render_widget_host_impl.h" | 74 #include "content/browser/renderer_host/render_widget_host_impl.h" |
75 #include "content/browser/web_contents/web_contents_impl.h" | 75 #include "content/browser/web_contents/web_contents_impl.h" |
76 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 76 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
77 #include "content/port/browser/render_widget_host_view_port.h" | 77 #include "content/port/browser/render_widget_host_view_port.h" |
78 #include "content/public/browser/browser_thread.h" | 78 #include "content/public/browser/browser_thread.h" |
79 #include "content/public/browser/notification_source.h" | 79 #include "content/public/browser/notification_source.h" |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 return false; | 1375 return false; |
1376 else | 1376 else |
1377 return true; | 1377 return true; |
1378 } | 1378 } |
1379 | 1379 |
1380 bool SmoothEventSampler::HasUnrecordedEvent() const { | 1380 bool SmoothEventSampler::HasUnrecordedEvent() const { |
1381 return !current_event_.is_null() && current_event_ != last_sample_; | 1381 return !current_event_.is_null() && current_event_ != last_sample_; |
1382 } | 1382 } |
1383 | 1383 |
1384 } // namespace content | 1384 } // namespace content |
OLD | NEW |