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

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

Issue 7395020: Create new GLSurface for cross process image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 5 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 29 matching lines...) Expand all
40 40
41 // Get the underlying platform specific surface "handle". 41 // Get the underlying platform specific surface "handle".
42 virtual void* GetHandle() = 0; 42 virtual void* GetHandle() = 0;
43 43
44 // 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
45 // FBO. Otherwise returns 0. 45 // FBO. Otherwise returns 0.
46 virtual unsigned int GetBackingFrameBufferObject(); 46 virtual unsigned int GetBackingFrameBufferObject();
47 47
48 static bool InitializeOneOff(); 48 static bool InitializeOneOff();
49 49
50 // Called after a context is made current with this surface.
51 virtual void OnMakeCurrent();
52
50 #if !defined(OS_MACOSX) 53 #if !defined(OS_MACOSX)
51 // Create a GL surface that renders directly to a view. 54 // Create a GL surface that renders directly to a view.
52 static scoped_refptr<GLSurface> CreateViewGLSurface( 55 static scoped_refptr<GLSurface> CreateViewGLSurface(
53 gfx::PluginWindowHandle window); 56 gfx::PluginWindowHandle window);
54 #endif 57 #endif
55 58
56 // Create a GL surface used for offscreen rendering. 59 // Create a GL surface used for offscreen rendering.
57 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( 60 static scoped_refptr<GLSurface> CreateOffscreenGLSurface(
58 const gfx::Size& size); 61 const gfx::Size& size);
59 62
60 protected: 63 protected:
61 virtual ~GLSurface(); 64 virtual ~GLSurface();
62 65
63 private: 66 private:
64 friend class base::RefCounted<GLSurface>; 67 friend class base::RefCounted<GLSurface>;
65 DISALLOW_COPY_AND_ASSIGN(GLSurface); 68 DISALLOW_COPY_AND_ASSIGN(GLSurface);
66 }; 69 };
67 70
68 } // namespace gfx 71 } // namespace gfx
69 72
70 #endif // UI_GFX_GL_GL_SURFACE_H_ 73 #endif // UI_GFX_GL_GL_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698