Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: content/browser/media/capture/desktop_capture_device.cc

Issue 2606783002: Make DirectX Capturer Default On (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/media/capture/desktop_capture_device.h" 5 #include "content/browser/media/capture/desktop_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <utility> 10 #include <utility>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 bool IsFrameUnpackedOrInverted(webrtc::DesktopFrame* frame) { 58 bool IsFrameUnpackedOrInverted(webrtc::DesktopFrame* frame) {
59 return frame->stride() != 59 return frame->stride() !=
60 frame->size().width() * webrtc::DesktopFrame::kBytesPerPixel; 60 frame->size().width() * webrtc::DesktopFrame::kBytesPerPixel;
61 } 61 }
62 62
63 } // namespace 63 } // namespace
64 64
65 #if defined(OS_WIN) 65 #if defined(OS_WIN)
66 const base::Feature kDirectXCapturer{"DirectXCapturer", 66 const base::Feature kDirectXCapturer{"DirectXCapturer",
67 base::FEATURE_DISABLED_BY_DEFAULT}; 67 base::FEATURE_ENABLED_BY_DEFAULT};
68 #endif 68 #endif
69 69
70 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback { 70 class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback {
71 public: 71 public:
72 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner, 72 Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
73 std::unique_ptr<webrtc::DesktopCapturer> capturer, 73 std::unique_ptr<webrtc::DesktopCapturer> capturer,
74 DesktopMediaID::Type type); 74 DesktopMediaID::Type type);
75 ~Core() override; 75 ~Core() override;
76 76
77 // Implementation of VideoCaptureDevice methods. 77 // Implementation of VideoCaptureDevice methods.
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 #else 462 #else
463 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT; 463 base::MessageLoop::Type thread_type = base::MessageLoop::TYPE_DEFAULT;
464 #endif 464 #endif
465 465
466 thread_.StartWithOptions(base::Thread::Options(thread_type, 0)); 466 thread_.StartWithOptions(base::Thread::Options(thread_type, 0));
467 467
468 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type)); 468 core_.reset(new Core(thread_.task_runner(), std::move(capturer), type));
469 } 469 }
470 470
471 } // namespace content 471 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698