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

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_texture_mapping.h

Issue 2099123002: [Chromoting] Improve DirectX capturer to support multiple outputs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix several lint errors Created 4 years, 4 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_
13
14 #include <D3D11.h>
15 #include <DXGI1_2.h>
16
17 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
18 #include "webrtc/modules/desktop_capture/desktop_region.h"
19 #include "webrtc/modules/desktop_capture/win/dxgi_texture.h"
20
21 namespace webrtc {
22
23 // A DxgiTexture which directly maps bitmap from IDXGIResource. This class is
24 // used when DXGI_OUTDUPL_DESC.DesktopImageInSystemMemory is true. (This usually
25 // means the video card shares main memory with CPU, instead of having its own
26 // individual memory.)
27 class DxgiTextureMapping : public DxgiTexture {
28 public:
29 // Creates a DxgiTextureMapping instance. Caller must maintain the lifetime
30 // of input duplication to make sure it outlives this instance.
31 DxgiTextureMapping(const DesktopRect& desktop_rect,
32 IDXGIOutputDuplication* duplication);
33
34 ~DxgiTextureMapping() override;
35
36 bool CopyFrom(const DXGI_OUTDUPL_FRAME_INFO& frame_info,
37 IDXGIResource* resource,
38 const DesktopRegion& region) override;
39
40 bool DoRelease() override;
41
42 private:
43 IDXGIOutputDuplication* const duplication_;
44 };
45
46 } // namespace webrtc
47
48 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_TEXTURE_MAPPING_H_
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_texture.cc ('k') | webrtc/modules/desktop_capture/win/dxgi_texture_mapping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698