blob: 857fdc9dae18aab63042ccd354646b85a7107663 [file] [log] [blame]
Shannon Woodse2632d22014-10-17 13:08:51 -04001//
2// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// RenderTarget.cpp: Implements serial handling for rx::RenderTarget
8
9#include "libGLESv2/renderer/RenderTarget.h"
10
11namespace rx
12{
13unsigned int RenderTarget::mCurrentSerial = 1;
14
Geoff Lang1bd642c2014-11-04 17:05:00 -050015RenderTarget::RenderTarget()
16 : mSerial(issueSerials(1))
17{
18}
19
20RenderTarget::~RenderTarget()
21{
22}
23
Shannon Woodse2632d22014-10-17 13:08:51 -040024unsigned int RenderTarget::getSerial() const
25{
26 return mSerial;
27}
28
29unsigned int RenderTarget::issueSerials(unsigned int count)
30{
31 unsigned int firstSerial = mCurrentSerial;
32 mCurrentSerial += count;
33 return firstSerial;
34}
Geoff Lang1bd642c2014-11-04 17:05:00 -050035
36}