Jamie Madill | 870352a | 2014-12-01 11:01:17 -0500 | [diff] [blame^] | 1 | // |
| 2 | // Copyright (c) 2014 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 | // DisplayImpl.cpp: Implementation methods of egl::Display |
| 8 | |
| 9 | #include "libANGLE/renderer/DisplayImpl.h" |
| 10 | |
| 11 | #include "libANGLE/Surface.h" |
| 12 | |
| 13 | namespace rx |
| 14 | { |
| 15 | |
| 16 | DisplayImpl::~DisplayImpl() |
| 17 | { |
| 18 | while (!mSurfaceSet.empty()) |
| 19 | { |
| 20 | destroySurface(*mSurfaceSet.begin()); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | void DisplayImpl::destroySurface(egl::Surface *surface) |
| 25 | { |
| 26 | mSurfaceSet.erase(surface); |
| 27 | SafeDelete(surface); |
| 28 | } |
| 29 | |
| 30 | } |