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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « ui/gl/gl_context_wgl.cc ('k') | ui/gl/gl_surface.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 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 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_GL_GL_SURFACE_H_ 5 #ifndef UI_GL_GL_SURFACE_H_
6 #define UI_GL_GL_SURFACE_H_ 6 #define UI_GL_GL_SURFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Unit tests should call these instead of InitializeOneOff() to set up 81 // Unit tests should call these instead of InitializeOneOff() to set up
82 // GL bindings appropriate for tests. 82 // GL bindings appropriate for tests.
83 static void InitializeOneOffForTests(); 83 static void InitializeOneOffForTests();
84 static void InitializeOneOffWithMockBindingsForTests(); 84 static void InitializeOneOffWithMockBindingsForTests();
85 static void InitializeDynamicMockBindingsForTests(GLContext* context); 85 static void InitializeDynamicMockBindingsForTests(GLContext* context);
86 86
87 // Called after a context is made current with this surface. Returns false 87 // Called after a context is made current with this surface. Returns false
88 // on error. 88 // on error.
89 virtual bool OnMakeCurrent(GLContext* context); 89 virtual bool OnMakeCurrent(GLContext* context);
90 90
91 // Called when the surface is bound as the current framebuffer for the
92 // current context.
93 virtual void NotifyWasBound();
94
91 // Used for explicit buffer management. 95 // Used for explicit buffer management.
92 virtual bool SetBackbufferAllocation(bool allocated); 96 virtual bool SetBackbufferAllocation(bool allocated);
93 virtual void SetFrontbufferAllocation(bool allocated); 97 virtual void SetFrontbufferAllocation(bool allocated);
94 98
95 // Get a handle used to share the surface with another process. Returns null 99 // Get a handle used to share the surface with another process. Returns null
96 // if this is not possible. 100 // if this is not possible.
97 virtual void* GetShareHandle(); 101 virtual void* GetShareHandle();
98 102
99 // Get the platform specific display on which this surface resides, if 103 // Get the platform specific display on which this surface resides, if
100 // available. 104 // available.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 200
197 private: 201 private:
198 scoped_refptr<GLSurface> surface_; 202 scoped_refptr<GLSurface> surface_;
199 203
200 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); 204 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
201 }; 205 };
202 206
203 } // namespace gfx 207 } // namespace gfx
204 208
205 #endif // UI_GL_GL_SURFACE_H_ 209 #endif // UI_GL_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_context_wgl.cc ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698