| 1 |
/* |
| 2 |
* Copyright (C) 2005-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "DRMUtils.h" |
| 12 |
|
| 13 |
namespace KODI |
| 14 |
{ |
| 15 |
namespace WINDOWING |
| 16 |
{ |
| 17 |
namespace GBM |
| 18 |
{ |
| 19 |
|
| 20 |
class CDRMLegacy : public CDRMUtils |
| 21 |
{ |
| 22 |
public: |
| 23 |
CDRMLegacy() = default; |
| 24 |
~CDRMLegacy() override = default; |
| 25 |
void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override; |
| 26 |
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) override; |
| 27 |
bool SetActive(bool active) override; |
| 28 |
bool InitDrm() override; |
| 29 |
|
| 30 |
private: |
| 31 |
bool WaitingForFlip(); |
| 32 |
bool QueueFlip(struct gbm_bo *bo); |
| 33 |
static void PageFlipHandler(int fd, unsigned int frame, unsigned int sec, |
| 34 |
unsigned int usec, void *data); |
| 35 |
}; |
| 36 |
|
| 37 |
} |
| 38 |
} |
| 39 |
} |