Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / android_webview / browser / aw_gl_surface.h
blob36ad96215cce81d1fef77f492d981440812fe919
1 // Copyright 2013 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.
5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_
8 #include "ui/gl/gl_surface.h"
10 namespace android_webview {
12 // This surface is used to represent the underlying surface provided by the App
13 // inside a hardware draw. Note that offscreen contexts will not be using this
14 // GLSurface.
15 class GL_EXPORT AwGLSurface : public gfx::GLSurface {
16 public:
17 AwGLSurface();
19 // Implement GLSurface.
20 void Destroy() override;
21 bool IsOffscreen() override;
22 unsigned int GetBackingFrameBufferObject() override;
23 gfx::SwapResult SwapBuffers() override;
24 gfx::Size GetSize() override;
25 void* GetHandle() override;
26 void* GetDisplay() override;
28 void SetBackingFrameBufferObject(unsigned int fbo);
30 protected:
31 ~AwGLSurface() override;
33 private:
34 unsigned int fbo_;
36 DISALLOW_COPY_AND_ASSIGN(AwGLSurface);
39 } // namespace android_webview
41 #endif // ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_