scoped_app_gl_state_restore_impl_angle.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ANDROID_WEBVIEW_BROWSER_GFX_SCOPED_APP_GL_STATE_RESTORE_IMPL_ANGLE_H_
  5. #define ANDROID_WEBVIEW_BROWSER_GFX_SCOPED_APP_GL_STATE_RESTORE_IMPL_ANGLE_H_
  6. #include <EGL/egl.h>
  7. #include "android_webview/browser/gfx/scoped_app_gl_state_restore.h"
  8. #include "base/dcheck_is_on.h"
  9. namespace android_webview {
  10. namespace internal {
  11. class ScopedAppGLStateRestoreImplAngle : public ScopedAppGLStateRestore::Impl {
  12. public:
  13. ScopedAppGLStateRestoreImplAngle(ScopedAppGLStateRestore::CallMode mode,
  14. bool save_restore);
  15. ScopedAppGLStateRestoreImplAngle(const ScopedAppGLStateRestoreImplAngle&) =
  16. delete;
  17. ScopedAppGLStateRestoreImplAngle& operator=(
  18. const ScopedAppGLStateRestoreImplAngle&) = delete;
  19. ~ScopedAppGLStateRestoreImplAngle() override;
  20. protected:
  21. #if DCHECK_IS_ON()
  22. EGLContext egl_context_ = EGL_NO_CONTEXT;
  23. #endif
  24. };
  25. } // namespace internal
  26. } // namespace android_webview
  27. #endif // ANDROID_WEBVIEW_BROWSER_GFX_SCOPED_APP_GL_STATE_RESTORE_IMPL_ANGLE_H_