Shannon Woods | e2632d2 | 2014-10-17 13:08:51 -0400 | [diff] [blame] | 1 | // |
| 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 | |
| 11 | namespace rx |
| 12 | { |
| 13 | unsigned int RenderTarget::mCurrentSerial = 1; |
| 14 | |
Geoff Lang | 1bd642c | 2014-11-04 17:05:00 -0500 | [diff] [blame^] | 15 | RenderTarget::RenderTarget() |
| 16 | : mSerial(issueSerials(1)) |
| 17 | { |
| 18 | } |
| 19 | |
| 20 | RenderTarget::~RenderTarget() |
| 21 | { |
| 22 | } |
| 23 | |
Shannon Woods | e2632d2 | 2014-10-17 13:08:51 -0400 | [diff] [blame] | 24 | unsigned int RenderTarget::getSerial() const |
| 25 | { |
| 26 | return mSerial; |
| 27 | } |
| 28 | |
| 29 | unsigned int RenderTarget::issueSerials(unsigned int count) |
| 30 | { |
| 31 | unsigned int firstSerial = mCurrentSerial; |
| 32 | mCurrentSerial += count; |
| 33 | return firstSerial; |
| 34 | } |
Geoff Lang | 1bd642c | 2014-11-04 17:05:00 -0500 | [diff] [blame^] | 35 | |
| 36 | } |