gl_fence_arb.h 801 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2014 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 UI_GL_GL_FENCE_ARB_H_
  5. #define UI_GL_GL_FENCE_ARB_H_
  6. #include "ui/gl/gl_bindings.h"
  7. #include "ui/gl/gl_export.h"
  8. #include "ui/gl/gl_fence.h"
  9. namespace gl {
  10. class GL_EXPORT GLFenceARB : public GLFence {
  11. public:
  12. GLFenceARB();
  13. GLFenceARB(const GLFenceARB&) = delete;
  14. GLFenceARB& operator=(const GLFenceARB&) = delete;
  15. ~GLFenceARB() override;
  16. // GLFence implementation:
  17. bool HasCompleted() override;
  18. void ClientWait() override;
  19. void ServerWait() override;
  20. void Invalidate() override;
  21. private:
  22. GLsync sync_ = 0;
  23. void HandleClientWaitFailure();
  24. };
  25. } // namespace gl
  26. #endif // UI_GL_GL_FENCE_ARB_H_