| 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 client's | 10 // 1. Reserve Buffer: Before a frame can be captured, a slot in the client's |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "content/browser/media/capture/web_contents_tracker.h" | 73 #include "content/browser/media/capture/web_contents_tracker.h" |
| 74 #include "content/browser/media/capture/window_activity_tracker.h" | 74 #include "content/browser/media/capture/window_activity_tracker.h" |
| 75 #include "content/browser/renderer_host/render_widget_host_impl.h" | 75 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 76 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 76 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 77 #include "content/public/browser/browser_thread.h" | 77 #include "content/public/browser/browser_thread.h" |
| 78 #include "content/public/browser/render_process_host.h" | 78 #include "content/public/browser/render_process_host.h" |
| 79 #include "content/public/browser/render_widget_host_view.h" | 79 #include "content/public/browser/render_widget_host_view.h" |
| 80 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 80 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
| 81 #include "content/public/browser/web_contents.h" | 81 #include "content/public/browser/web_contents.h" |
| 82 #include "content/public/browser/web_contents_media_capture_id.h" | 82 #include "content/public/browser/web_contents_media_capture_id.h" |
| 83 #include "device/capture/content/screen_capture_device_core.h" |
| 84 #include "device/capture/content/thread_safe_capture_oracle.h" |
| 85 #include "device/capture/content/video_capture_oracle.h" |
| 83 #include "media/base/bind_to_current_loop.h" | 86 #include "media/base/bind_to_current_loop.h" |
| 84 #include "media/base/video_capture_types.h" | 87 #include "media/base/video_capture_types.h" |
| 85 #include "media/base/video_frame_metadata.h" | 88 #include "media/base/video_frame_metadata.h" |
| 86 #include "media/base/video_util.h" | 89 #include "media/base/video_util.h" |
| 87 #include "media/capture/content/screen_capture_device_core.h" | |
| 88 #include "media/capture/content/thread_safe_capture_oracle.h" | |
| 89 #include "media/capture/content/video_capture_oracle.h" | |
| 90 #include "skia/ext/image_operations.h" | 90 #include "skia/ext/image_operations.h" |
| 91 #include "third_party/skia/include/core/SkBitmap.h" | 91 #include "third_party/skia/include/core/SkBitmap.h" |
| 92 #include "third_party/skia/include/core/SkColor.h" | 92 #include "third_party/skia/include/core/SkColor.h" |
| 93 #include "ui/base/layout.h" | 93 #include "ui/base/layout.h" |
| 94 #include "ui/gfx/geometry/dip_util.h" | 94 #include "ui/gfx/geometry/dip_util.h" |
| 95 #include "ui/gfx/geometry/size_conversions.h" | 95 #include "ui/gfx/geometry/size_conversions.h" |
| 96 | 96 |
| 97 namespace content { | 97 namespace content { |
| 98 | 98 |
| 99 namespace { | 99 namespace { |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 974 |
| 975 void WebContentsVideoCaptureDevice::RequestRefreshFrame() { | 975 void WebContentsVideoCaptureDevice::RequestRefreshFrame() { |
| 976 core_->RequestRefreshFrame(); | 976 core_->RequestRefreshFrame(); |
| 977 } | 977 } |
| 978 | 978 |
| 979 void WebContentsVideoCaptureDevice::StopAndDeAllocate() { | 979 void WebContentsVideoCaptureDevice::StopAndDeAllocate() { |
| 980 core_->StopAndDeAllocate(); | 980 core_->StopAndDeAllocate(); |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace content | 983 } // namespace content |
| OLD | NEW |