Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: ui/gfx/gl/gl_surface_android.h

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_surface.cc ('k') | ui/gfx/gl/gl_surface_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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
5 #ifndef UI_GFX_GL_GL_SURFACE_ANDROID_H_
6 #define UI_GFX_GL_GL_SURFACE_ANDROID_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "ui/gfx/gl/gl_surface_egl.h"
11
12 namespace gfx {
13
14 // A view surface. This can be created in the GPU process (default case), or
15 // browser process (in-process-gpu), or render process (in-process-webgl). When
16 // it is initialized, it always uses a pbuffer EGL surface until the native view
17 // is set. The native view is in charge of sharing the GL texture with UI thread
18 // in the browser process through SurfaceTexture.
19 class AndroidViewSurface : public NativeViewGLSurfaceEGL {
20 public:
21 AndroidViewSurface();
22 virtual ~AndroidViewSurface();
23
24 // Implement GLSurface.
25 virtual bool Initialize() OVERRIDE;
26 virtual void Destroy() OVERRIDE;
27 virtual bool Resize(const gfx::Size& size) OVERRIDE;
28 virtual bool IsOffscreen() OVERRIDE;
29 virtual bool SwapBuffers() OVERRIDE;
30 virtual gfx::Size GetSize() OVERRIDE;
31 virtual EGLSurface GetHandle() OVERRIDE;
32 virtual void SetNativeWindow(AndroidNativeWindow* window) OVERRIDE;
33
34 private:
35 bool CreateWindowSurface(AndroidNativeWindow* window);
36 scoped_refptr<PbufferGLSurfaceEGL> pbuffer_surface_;
37 AndroidNativeWindow* window_;
38
39 DISALLOW_COPY_AND_ASSIGN(AndroidViewSurface);
40 };
41
42 } // namespace gfx
43
44 #endif /* UI_GFX_GL_GL_SURFACE_ANDROID_H_ */
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface.cc ('k') | ui/gfx/gl/gl_surface_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698