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
15 class GL_EXPORT AwGLSurface
: public gfx::GLSurface
{
19 // Implement GLSurface.
20 virtual void Destroy() OVERRIDE
;
21 virtual bool IsOffscreen() OVERRIDE
;
22 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE
;
23 virtual bool SwapBuffers() OVERRIDE
;
24 virtual gfx::Size
GetSize() OVERRIDE
;
25 virtual void* GetHandle() OVERRIDE
;
26 virtual void* GetDisplay() OVERRIDE
;
28 void SetBackingFrameBufferObject(unsigned int fbo
);
29 void ResetBackingFrameBufferObject();
32 virtual ~AwGLSurface();
37 DISALLOW_COPY_AND_ASSIGN(AwGLSurface
);
40 } // namespace android_webview
42 #endif // ANDROID_WEBVIEW_BROWSER_AW_GL_SURFACE_H_