summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl/gl_surface_wgl.cc
Commit message (Collapse)AuthorAgeFilesLines
* ui: Move gl/ directory out of gfx/, up to ui/.tfarina@chromium.org2012-05-121-366/+0
| | | | | | | | | | BUG=104040 R=ben@chromium.org TBR=tony@chromium.org Review URL: https://chromiumcodereview.appspot.com/10392068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136777 0039d316-1c4b-4281-b951-d872f2087c98
* Change PluginWindowHandle to AcceleratedWidget in ui/gfx/glpiman@chromium.org2012-02-011-2/+2
| | | | | | | | | | BUG=104551 TEST=compile Review URL: http://codereview.chromium.org/9160012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119990 0039d316-1c4b-4281-b951-d872f2087c98
* use-gl=desktop mode got broken in r109111. GL proc addresses were not being ↵alokp@chromium.org2011-11-171-4/+22
| | | | | | | | | | | found because ::GetProcAddress does not work with stock opengl32.dll. The stock dll just exposes GL 1.1 interface. wglGetProcAddress needs to be used to get >GL 1.1 interface, which in turn requires a GL current context. This patch simply reverts a portion of r109111. BUG=103765 Review URL: http://codereview.chromium.org/8588009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110455 0039d316-1c4b-4281-b951-d872f2087c98
* Fix --use-gl=any command-line option. The current implementation only checks ↵alokp@chromium.org2011-11-081-106/+108
| | | | | | | | | for the availability of certain shared libraries to determine of a GL implementation is feasible. You really have to actually create a context and check pixel formats to determine the feasibilty. Thsi patch refactors GLSurface::InitializeOneOff() to do further checking. BUG=102672 Review URL: http://codereview.chromium.org/8451008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109111 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 107243 - Added GLSurfaceAdapter, an implementation of GLSurface that ↵apatrick@chromium.org2011-10-261-1/+5
| | | | | | | | | | | | | | | | | | forwards all calls to another instance of GLSurface. This is to allow new implementations of GLSurface that "derive" from different implementations selected at runtime. For example an ImageTransportSurface might derive from either GLSurfaceOSMesa or GLSurfaceGLX depending on the current GL backend in use. See http://codereview.chromium.org/8060045/. Other yak shaving includes: - Ensure no GLContext implementations do not assume that they can statically cast a GLSurface to a particular concrete type. E.g. GLContextGLX might actually be working together with a GLSurfaceAdapter derived class that delegates out to the actual GLSurfaceGLX. To that end, I made all the classes implement the likes of GetDisplay as virtuals rather than statics in the same way as we already did with GLSurfaceEGL. - Add a Resize method to GLSurfaceEGL to allow resizing of a shared pbuffer surface. - Add a method to get the D3D share handle for a PbufferGLSurfaceEGL Review URL: http://codereview.chromium.org/8390011 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/8395027 Review URL: http://codereview.chromium.org/8394060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107433 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107243 - Added GLSurfaceAdapter, an implementation of GLSurface that ↵apatrick@chromium.org2011-10-251-5/+1
| | | | | | | | | | | | | | | | | forwards all calls to another instance of GLSurface. This is to allow new implementations of GLSurface that "derive" from different implementations selected at runtime. For example an ImageTransportSurface might derive from either GLSurfaceOSMesa or GLSurfaceGLX depending on the current GL backend in use. See http://codereview.chromium.org/8060045/. Other yak shaving includes: - Ensure no GLContext implementations do not assume that they can statically cast a GLSurface to a particular concrete type. E.g. GLContextGLX might actually be working together with a GLSurfaceAdapter derived class that delegates out to the actual GLSurfaceGLX. To that end, I made all the classes implement the likes of GetDisplay as virtuals rather than statics in the same way as we already did with GLSurfaceEGL. - Add a Resize method to GLSurfaceEGL to allow resizing of a shared pbuffer surface. - Add a method to get the D3D share handle for a PbufferGLSurfaceEGL Review URL: http://codereview.chromium.org/8390011 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/8395027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107248 0039d316-1c4b-4281-b951-d872f2087c98
* Added GLSurfaceAdapter, an implementation of GLSurface that forwards all ↵apatrick@chromium.org2011-10-251-1/+5
| | | | | | | | | | | | | | calls to another instance of GLSurface. This is to allow new implementations of GLSurface that "derive" from different implementations selected at runtime. For example an ImageTransportSurface might derive from either GLSurfaceOSMesa or GLSurfaceGLX depending on the current GL backend in use. See http://codereview.chromium.org/8060045/. Other yak shaving includes: - Ensure no GLContext implementations do not assume that they can statically cast a GLSurface to a particular concrete type. E.g. GLContextGLX might actually be working together with a GLSurfaceAdapter derived class that delegates out to the actual GLSurfaceGLX. To that end, I made all the classes implement the likes of GetDisplay as virtuals rather than statics in the same way as we already did with GLSurfaceEGL. - Add a Resize method to GLSurfaceEGL to allow resizing of a shared pbuffer surface. - Add a method to get the D3D share handle for a PbufferGLSurfaceEGL Review URL: http://codereview.chromium.org/8390011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107243 0039d316-1c4b-4281-b951-d872f2087c98
* Do not allocate depth-stencil buffers for GLSurfaces.apatrick@chromium.org2011-08-091-2/+2
| | | | | | | | | | We don't need them here. Whenever we need a depth-stencil buffer, it's as a renderbuffer attached to a non-default FBO. This will save some video memory. Review URL: http://codereview.chromium.org/7598013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95964 0039d316-1c4b-4281-b951-d872f2087c98
* Moving DCHECK to the return value only.bradnelson@google.com2011-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | As we want to call GetClientRect, even in non-release builds. BUG=Failing on release builder with: 375>d:\b\build\slave\chrome-official\build\src\third_party\leveldb\util\env_chromium.cc(239) : warning C4722: 'leveldb::`anonymous namespace'::ChromiumEnv::~ChromiumEnv' : destructor never returns, potential memory leak 365>d:\b\build\slave\chrome-official\build\src\ui\gfx\gl\gl_surface_wgl.cc(264) : error C2220: warning treated as error - no 'executable' file generated 365>d:\b\build\slave\chrome-official\build\src\ui\gfx\gl\gl_surface_wgl.cc(264) : warning C4700: uninitialized local variable 'rect' used 375>d:\b\build\slave\chrome-official\build\src\ui\gfx\gl\gl_surface_wgl.cc(264) : error C2220: warning treated as error - no 'executable' file generated 375>d:\b\build\slave\chrome-official\build\src\ui\gfx\gl\gl_surface_wgl.cc(264) : warning C4700: uninitialized local variable 'rect' used 365>d:\b\build\slave\chrome-official\build\src\third_party\leveldb\util\env_chromium.cc(239) : warning C4722: 'leveldb::`anonymous namespace'::ChromiumEnv::~ChromiumEnv' : destructor never returns, potential memory leak 375>LINK : fatal error LNK1257: code generation failed TEST=Built locally. R=apatrick@chromium.org Review URL: http://codereview.chromium.org/7349012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92228 0039d316-1c4b-4281-b951-d872f2087c98
* GLContext no longer holds a pointer to a GLSurface.apatrick@chromium.org2011-05-231-22/+12
| | | | | | | | | | This is part of an ongoing effort to treat GL contexts and GL surfaces as independent entities. TEST=run WebGL on mac, windows and linux, trybots BUG=none Review URL: http://codereview.chromium.org/7021014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86332 0039d316-1c4b-4281-b951-d872f2087c98
* Partially fix WGL backend on windows.apatrick@chromium.org2011-05-121-17/+71
| | | | | | | | | | It should render on all windows boxes with working GL. The GPU process creates a child window to render to again, but only if desktop GL has been enabled. The child window is not created by default so there should not be issues with deadlocks. Resizing flickers for some reason. TEST=WebGL works, trybots. BUG=none Review URL: http://codereview.chromium.org/6991002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85181 0039d316-1c4b-4281-b951-d872f2087c98
* Split WGL implementations of *GLContext in GLContextWGL and *GLSurfaceWGL.apatrick@chromium.org2011-04-151-0/+297
Surfaces are independent of contexts in GL. To facilitate sharing of surfaces between processes, I have separated them from the notion of contexts because contexts cannot be shared between processes. I started with EGL in r81512. This is the same thing for WGL. GLContextEGL still has a pointer to a surface and still has some surface specific operations that just forward through to it. Once I have refactored all the GLContext implementations in this way, I will remove these pointers and the surface specific opertations. There will not be "view" and "offscreen" GL contexts. Rather there will be a single context type for each backend which can be made current with a surface that directs output either to a view or offscreen surface. Review URL: http://codereview.chromium.org/6864002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81807 0039d316-1c4b-4281-b951-d872f2087c98