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

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

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: first cut of IPC version Created 9 years, 2 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
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 "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // Returns the internal frame buffer object name if the surface is backed by 47 // Returns the internal frame buffer object name if the surface is backed by
48 // FBO. Otherwise returns 0. 48 // FBO. Otherwise returns 0.
49 virtual unsigned int GetBackingFrameBufferObject(); 49 virtual unsigned int GetBackingFrameBufferObject();
50 50
51 static bool InitializeOneOff(); 51 static bool InitializeOneOff();
52 52
53 // Called after a context is made current with this surface. 53 // Called after a context is made current with this surface.
54 virtual void OnMakeCurrent(GLContext* context); 54 virtual void OnMakeCurrent(GLContext* context);
55 55
56 virtual void OnSetSurfaceVisible(bool visible);
apatrick_chromium 2011/10/13 19:51:31 I think it's okay to add this to GLSurface. I woul
57
56 // Create a GL surface that renders directly to a view. 58 // Create a GL surface that renders directly to a view.
57 static scoped_refptr<GLSurface> CreateViewGLSurface( 59 static scoped_refptr<GLSurface> CreateViewGLSurface(
58 bool software, 60 bool software,
59 gfx::PluginWindowHandle window); 61 gfx::PluginWindowHandle window);
60 62
61 // Create a GL surface used for offscreen rendering. 63 // Create a GL surface used for offscreen rendering.
62 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( 64 static scoped_refptr<GLSurface> CreateOffscreenGLSurface(
63 bool software, 65 bool software,
64 const gfx::Size& size); 66 const gfx::Size& size);
65 67
66 static GLSurface* GetCurrent(); 68 static GLSurface* GetCurrent();
67 69
68 protected: 70 protected:
69 virtual ~GLSurface(); 71 virtual ~GLSurface();
70 static void SetCurrent(GLSurface* surface); 72 static void SetCurrent(GLSurface* surface);
71 73
72 private: 74 private:
73 friend class base::RefCounted<GLSurface>; 75 friend class base::RefCounted<GLSurface>;
74 friend class GLContext; 76 friend class GLContext;
75 DISALLOW_COPY_AND_ASSIGN(GLSurface); 77 DISALLOW_COPY_AND_ASSIGN(GLSurface);
76 }; 78 };
77 79
78 } // namespace gfx 80 } // namespace gfx
79 81
80 #endif // UI_GFX_GL_GL_SURFACE_H_ 82 #endif // UI_GFX_GL_GL_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698