blob: 6d8791f3c16ac00c7e54ced91d7c1235cdf35f18 (
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
30
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GL_GL_STATE_RESTORER_H_
#define UI_GL_GL_STATE_RESTORER_H_
#include "base/basictypes.h"
#include "ui/gl/gl_export.h"
namespace gfx {
// An interface for Restoring GL State.
// This will expand over time to provide an more optimizable implementation.
class GL_EXPORT GLStateRestorer {
public:
GLStateRestorer();
virtual ~GLStateRestorer();
virtual bool IsInitialized() = 0;
virtual void RestoreState() = 0;
virtual void RestoreAllTextureUnitBindings() = 0;
virtual void RestoreFramebufferBindings() = 0;
DISALLOW_COPY_AND_ASSIGN(GLStateRestorer);
};
} // namespace gfx
#endif // UI_GL_GL_STATE_RESTORER_H_
|