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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #include "third_party/skia/include/core/SkColor.h" | 94 #include "third_party/skia/include/core/SkColor.h" |
95 #include "ui/gfx/rect.h" | 95 #include "ui/gfx/rect.h" |
96 #include "ui/gfx/skia_util.h" | 96 #include "ui/gfx/skia_util.h" |
97 | 97 |
98 namespace content { | 98 namespace content { |
99 | 99 |
100 namespace { | 100 namespace { |
101 | 101 |
102 const int kMinFrameWidth = 2; | 102 const int kMinFrameWidth = 2; |
103 const int kMinFrameHeight = 2; | 103 const int kMinFrameHeight = 2; |
104 const int kMaxFramesInFlight = 2; | |
105 const int kMaxSnapshotsInFlight = 1; | |
106 | 104 |
107 // TODO(nick): Remove this once frame subscription is supported on Aura and | 105 // TODO(nick): Remove this once frame subscription is supported on Aura and |
108 // Linux. | 106 // Linux. |
109 #if (defined(OS_WIN) || defined(OS_MACOSX)) || defined(USE_AURA) | 107 #if (defined(OS_WIN) || defined(OS_MACOSX)) || defined(USE_AURA) |
110 const bool kAcceleratedSubscriberIsSupported = true; | 108 const bool kAcceleratedSubscriberIsSupported = true; |
111 #else | 109 #else |
112 const bool kAcceleratedSubscriberIsSupported = false; | 110 const bool kAcceleratedSubscriberIsSupported = false; |
113 #endif | 111 #endif |
114 | 112 |
115 // Returns the nearest even integer closer to zero. | 113 // Returns the nearest even integer closer to zero. |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 void WebContentsVideoCaptureDevice::DeAllocate() { | 1267 void WebContentsVideoCaptureDevice::DeAllocate() { |
1270 impl_->DeAllocate(); | 1268 impl_->DeAllocate(); |
1271 } | 1269 } |
1272 | 1270 |
1273 const media::VideoCaptureDevice::Name& | 1271 const media::VideoCaptureDevice::Name& |
1274 WebContentsVideoCaptureDevice::device_name() { | 1272 WebContentsVideoCaptureDevice::device_name() { |
1275 return device_name_; | 1273 return device_name_; |
1276 } | 1274 } |
1277 | 1275 |
1278 } // namespace content | 1276 } // namespace content |
OLD | NEW |