blob: cd7c594ffc83c3e57458b9988b5e4109a0343af3 [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
Geoff Lang2b5420c2014-11-19 14:20:15 -05009#include "libANGLE/renderer/RenderTarget.h"
Shannon Woodse2632d22014-10-17 13:08:51 -040010
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}