blob: 18ca99097074eade1f065105950fd6db2bc1ad8f [file] [log] [blame]
zijiehecf5753d2017-04-20 12:06:04 -07001/*
2 * Copyright (c) 2017 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#include "webrtc/modules/desktop_capture/win/dxgi_context.h"
12#include "webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.h"
13
14namespace webrtc {
15
16DxgiAdapterContext::DxgiAdapterContext() = default;
17DxgiAdapterContext::DxgiAdapterContext(
18 const DxgiAdapterContext& context) = default;
19DxgiAdapterContext::~DxgiAdapterContext() = default;
20
21DxgiFrameContext::DxgiFrameContext() = default;
22
23DxgiFrameContext::~DxgiFrameContext() {
zijiehe67e438f2017-07-12 17:29:36 -070024 Reset();
zijiehecf5753d2017-04-20 12:06:04 -070025}
26
27void DxgiFrameContext::Reset() {
zijiehe67e438f2017-07-12 17:29:36 -070028 DxgiDuplicatorController::Instance()->Unregister(this);
zijiehecf5753d2017-04-20 12:06:04 -070029 controller_id = 0;
30}
31
32} // namespace webrtc