summaryrefslogtreecommitdiffstats
path: root/chromium/mojo/public/cpp/gles2/gles2.h
blob: a408fc701ebeb3b1a606e2505a366a33f21c06c7 (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
// Copyright 2014 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 MOJO_PUBLIC_CPP_GLES2_GLES2_H_
#define MOJO_PUBLIC_CPP_GLES2_GLES2_H_

#include "mojo/public/c/gles2/gles2.h"
#include "mojo/public/cpp/environment/environment.h"

namespace mojo {

class GLES2Initializer {
 public:
  explicit GLES2Initializer(const MojoAsyncWaiter* async_waiter =
                                Environment::GetDefaultAsyncWaiter()) {
    MojoGLES2Initialize(async_waiter);
  }
  ~GLES2Initializer() { MojoGLES2Terminate(); }
};

}  // namespace mojo

#endif  // MOJO_PUBLIC_CPP_GLES2_GLES2_H_