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

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

Issue 6880218: Removed "compositor" child window that was created by the GPU process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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_context_egl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_GL_GL_SURFACE_H_ 5 #ifndef UI_GFX_GL_GL_SURFACE_H_
6 #define UI_GFX_GL_GL_SURFACE_H_ 6 #define UI_GFX_GL_GL_SURFACE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 14
15 // Encapsulates a surface that can be rendered to with GL, hiding platform 15 // Encapsulates a surface that can be rendered to with GL, hiding platform
16 // specific management. 16 // specific management.
17 class GLSurface { 17 class GLSurface {
18 public: 18 public:
19 GLSurface() {} 19 GLSurface() {}
20 virtual ~GLSurface() {} 20 virtual ~GLSurface() {}
21 21
22 // (Re)create the surface. TODO(apatrick): This is an ugly hack to allow the
23 // EGL surface associated to be recreated without destroying the associated
24 // context. The implementation of this function for other GLSurface derived
25 // classes is in a pending changelist.
26 virtual bool Initialize() { return true; }
27
22 // Destroys the surface. 28 // Destroys the surface.
23 virtual void Destroy() = 0; 29 virtual void Destroy() = 0;
24 30
25 // Returns true if this surface is offscreen. 31 // Returns true if this surface is offscreen.
26 virtual bool IsOffscreen() = 0; 32 virtual bool IsOffscreen() = 0;
27 33
28 // Swaps front and back buffers. This has no effect for off-screen 34 // Swaps front and back buffers. This has no effect for off-screen
29 // contexts. 35 // contexts.
30 virtual bool SwapBuffers() = 0; 36 virtual bool SwapBuffers() = 0;
31 37
32 // Get the size of the surface. 38 // Get the size of the surface.
33 virtual gfx::Size GetSize() = 0; 39 virtual gfx::Size GetSize() = 0;
34 40
35 // Get the underlying platform specific surface "handle". 41 // Get the underlying platform specific surface "handle".
36 virtual void* GetHandle() = 0; 42 virtual void* GetHandle() = 0;
37 43
38 // Returns the internal frame buffer object name if the surface is backed by 44 // Returns the internal frame buffer object name if the surface is backed by
39 // FBO. Otherwise returns 0. 45 // FBO. Otherwise returns 0.
40 virtual unsigned int GetBackingFrameBufferObject(); 46 virtual unsigned int GetBackingFrameBufferObject();
41 47
42 private: 48 private:
43 DISALLOW_COPY_AND_ASSIGN(GLSurface); 49 DISALLOW_COPY_AND_ASSIGN(GLSurface);
44 }; 50 };
45 51
46 } // namespace gfx 52 } // namespace gfx
47 53
48 #endif // UI_GFX_GL_GL_SURFACE_H_ 54 #endif // UI_GFX_GL_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698