summaryrefslogtreecommitdiffstats
path: root/xbmc/cores/VideoPlayer/VideoRenderers/RenderCaptureGLES.cpp
blob: 0c1ce14c58f398080069ada4d0858f1901cf7396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *  Copyright (C) 2005-2021 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#include "RenderCaptureGLES.h"

CRenderCaptureGLES::~CRenderCaptureGLES()
{
  delete[] m_pixels;
}

void CRenderCaptureGLES::BeginRender()
{
  if (m_bufferSize != m_width * m_height * 4)
  {
    delete[] m_pixels;
    m_bufferSize = m_width * m_height * 4;
    m_pixels = new uint8_t[m_bufferSize];
  }
}

void CRenderCaptureGLES::EndRender()
{
  SetState(CAPTURESTATE_DONE);
}