summaryrefslogtreecommitdiffstats
path: root/app/gfx
Commit message (Collapse)AuthorAgeFilesLines
* Fixed stack overflow if wglGetExtensionsStringARB is not available.apatrick@chromium.org2010-11-161-1/+1
| | | | | | | | | TEST=try BUG=none Review URL: http://codereview.chromium.org/5087001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66318 0039d316-1c4b-4281-b951-d872f2087c98
* Added glResizeCHRM to resize the drawable associated with the command buffer.gman@chromium.org2010-11-161-0/+5
| | | | | | | | | | | | | | | | | This new command is used to pipe resize requests to the GPU process. It will allow is to synchronize the resize with the drawing. Specifically, if we resize at the wrong time, we will damage the backbuffer, causing visual artefacts (http://code.google.com/p/chromium/issues/detail?id=54430). The resize request gets sent to the GLContext. Each backend will implement it differently. At this point it's set as a NOP. -I will do an XResizeWindow on Linux. -Nat will do a resize on Windows. -Nico (or me?) will refactor the MacOSX code to use this path. There is one line webkit patch that's necessary to activate this code (removing an #ifdef). BUG=none TEST=none Review URL: http://codereview.chromium.org/4671003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66307 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer native library symbol lookup to the platform GetProcAddress.kbr@google.com2010-11-111-6/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/4791002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65854 0039d316-1c4b-4281-b951-d872f2087c98
* Add in changes I forgot in last previous CLgman@chromium.org2010-11-042-3/+1
| | | | | | | | | | | These are only comment changes. No code has changed. TEST=none BUG=none TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65105 0039d316-1c4b-4281-b951-d872f2087c98
* Add service side GL call logging to the DEBUGgman@chromium.org2010-11-046-35/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build of Chrome. For now you need to call InitDebugGLBindings. It seems like it would be nice to add a flag or check an environment variable but it also seems strange to add a flag just for debugging. Then again I guess we have --gpu-startup-dialog. Also, to really make this work will require both an special ostream and adding a bunch more type info the generate_bindings.py so it can cast values appropriately. For example it would be nice if it cast GLenum to an object that printed the enum name. It would also be nice if it cast const GLubyte* and void* to appropriate things depending on usage so the stream can write the correct stuff. For now though it does show all the calls which is useful in and of itself. Any idea how to get base/logging.h working on mac? TEST=ran it in the opengl es 2.0 conformance tests. BUG=none Review URL: http://codereview.chromium.org/4464002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65096 0039d316-1c4b-4281-b951-d872f2087c98
* OSMesa SwapBuffers does not fail if the window handle is invalid on windows.apatrick@chromium.org2010-11-041-9/+18
| | | | | | | | | | | This is because the primary application of this class of GLContext is for testing and we do not want every GL related ui browser test to become flaky if there is a race condition between GL context destruction and window destruction. TEST=try BUG=none Review URL: http://codereview.chromium.org/4458001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65011 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed mismatched channel order in OSMesaViewGLContext.apatrick@chromium.org2010-11-031-5/+7
| | | | | | | | | | | Made failing SwapBuffers not an error. We have a race condition whereby a window can be closed while the GPU process is rendering. This could make ui and browser tests flaky. TEST=try, make sure color channels are not reversed BUG=none Review URL: http://codereview.chromium.org/4281003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64858 0039d316-1c4b-4281-b951-d872f2087c98
* ui_tests run with --use-gl=osmesa so they use the OSMesa software renderer ↵apatrick@chromium.org2010-10-272-4/+16
| | | | | | | | | | | | | for GL. This to ensure that ui_tests run consistently regardless of the GPU capabilities, or absense, of the box they run on. TEST=try BUG=none Review URL: http://codereview.chromium.org/4138003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64122 0039d316-1c4b-4281-b951-d872f2087c98
* Specify client version 2 when creating EGL contexts.apatrick@chromium.org2010-10-271-2/+6
| | | | | | | | | | | | | It was doing this already for SecondaryEGLContext but not for NativeViewEGLContext, which made it default to EGL version 1 on non-ANGLE EGL implementations. I also fixed ANGLE upstream in r468 so it fails to create a context unless version 2 is explicitly requested. TEST=try BUG=53823 Review URL: http://codereview.chromium.org/4089006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64119 0039d316-1c4b-4281-b951-d872f2087c98
* Expose bindings for glGetTexLevelParameter[fi]. These functions will be ↵senorblanco@chromium.org2010-10-222-0/+10
| | | | | | | | | | | needed by WebGraphicsContext3DDefaultImpl in WebKit. BUG=60314 TEST=none Review URL: http://codereview.chromium.org/3976003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63528 0039d316-1c4b-4281-b951-d872f2087c98
* Report EGL error strings whenever an EGL function fails.apatrick@chromium.org2010-10-191-27/+107
| | | | | | | | | TEST=try, check ANGLE works locally, simulate failure of EGL function and check log output BUG=53823 Review URL: http://codereview.chromium.org/3877001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63101 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - app/.pkasting@chromium.org2010-10-194-5/+5
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3771009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63000 0039d316-1c4b-4281-b951-d872f2087c98
* Move constructor and destructor of MockGLInterface out of line.thakis@chromium.org2010-10-141-409/+0
| | | | | | | | | | | | | Speeds up building all of gpu by over one minute / over 10% on my machine (from 9:23 to 8:11). Move the mock to gpu/command_buffer/common to have a more obvious place for the cc file. BUG=None TEST=None Review URL: http://codereview.chromium.org/3811006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62649 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the wrong mesa lib name.zmo@google.com2010-10-081-2/+2
| | | | | | Review URL: http://codereview.chromium.org/3596012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61902 0039d316-1c4b-4281-b951-d872f2087c98
* Added switch to disable GPU vsync.apatrick@chromium.org2010-10-0711-7/+160
| | | | | | | | | | | This is useful for GPU performance testing because the vsync caps the frame rate. TEST=try BUG=none Review URL: http://codereview.chromium.org/3380011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61877 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed crash when GetClientRect fails.apatrick@chromium.org2010-10-061-1/+5
| | | | | | | | | | | There is a known race condition with windows being destroyed while the GPU process has a live handle to them. This change treats destroyed windows as having size zero rather than crashing. TEST=try BUG=58065 Review URL: http://codereview.chromium.org/3549018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61702 0039d316-1c4b-4281-b951-d872f2087c98
* Load libGLESv2.dll before libEGL.dll.apatrick@chromium.org2010-10-063-10/+50
| | | | | | | | | | | EGL is dependent on GLESv2 so load the latter first in case there is another version somewhere in the DLL search path. TEST=try BUG=58064 Review URL: http://codereview.chromium.org/3609011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61690 0039d316-1c4b-4281-b951-d872f2087c98
* GPU process does one-off EGL initialization on linux.apatrick@chromium.org2010-10-051-11/+23
| | | | | | | | | | | This should get WebGL working on EGL/GLES2 ARM boxes again. TEST=try BUG=53823 Review URL: http://codereview.chromium.org/3466011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61565 0039d316-1c4b-4281-b951-d872f2087c98
* Add offscreen context creation attributes to GGL.enne@chromium.org2010-10-013-6/+26
| | | | | | | | | | | View contexts and more extensive color format picking not handled yet. BUG=39849 TEST=WebGL conformance tests (context*.html) Review URL: http://codereview.chromium.org/3302019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61220 0039d316-1c4b-4281-b951-d872f2087c98
* Added lots of logging to the GPU code.apatrick@chromium.org2010-09-209-34/+81
| | | | | | | | | | | This should help us diagnose initialization failures. TEST=try BUG=none Review URL: http://codereview.chromium.org/3380010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59970 0039d316-1c4b-4281-b951-d872f2087c98
* GPU process reports context lost when SwapBuffers fails.apatrick@chromium.org2010-09-109-34/+43
| | | | | | | | | | | This is to give the renderer or plugin process an opportunity to recover. TEST=try BUG=none Review URL: http://codereview.chromium.org/3305028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59115 0039d316-1c4b-4281-b951-d872f2087c98
* Loads GL shared libraries from module directories rather than exe directory.vangelis@chromium.org2010-09-103-13/+13
| | | | | | | | | | | This is because when chrome is installed, the shared libraries go in a different directory to the exe. TEST=try BUG=none Review URL: http://codereview.chromium.org/3351021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59036 0039d316-1c4b-4281-b951-d872f2087c98
* Added GPU stat for whether a GPU can report context lost.apatrick@chromium.org2010-09-072-1/+8
| | | | | | | | | | | | | | | On Windows it checks to see if the IDirect3D9 object supports Vista and later features (meaning it won't routinely report lost contexts). On Linux and Mac we can just check if its EGL versus some other GL that doesn't report lost contexts. I routed the stats to the renderer process so webkit code can query whether lost contexts are likely. I didn't wire up breakpad yet. TEST=try BUG=52318 Review URL: http://codereview.chromium.org/3149016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58755 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move some heavy, repeatedly emitted symbols to implementation files.erg@google.com2010-08-301-0/+1
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3162047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57896 0039d316-1c4b-4281-b951-d872f2087c98
* Rework gfx::Font by moving platform-specific code into inner classes.ben@chromium.org2010-08-131-1/+1
| | | | | | | | | | | | | gfx::Font is a platform-neutral API shim that exists as a wrapper object to allow for the creation and lifetime of gfx::Font objects to remain consistent with past usage. gfx::PlatformFont is an interface implemented by the platform-specific inner classes (gfx::PlatformFontWin,Mac,Gtk). BUG=none TEST=existing unittests Review URL: http://codereview.chromium.org/3083022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56040 0039d316-1c4b-4281-b951-d872f2087c98
* Removed reference to glew from comment.apatrick@chromium.org2010-08-121-1/+1
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/3175007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55925 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed build problems on Mac OS X when using GLContext from Chromium'skbr@google.com2010-08-106-7/+10
| | | | | | | | | | | | WebKit code. Added glIsFramebufferEXT and glIsRenderbufferEXT as preferred aliases. BUG=none TEST=WebGL, try bots Review URL: http://codereview.chromium.org/3146002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55584 0039d316-1c4b-4281-b951-d872f2087c98
* Added a couple of new GL extension bindings.apatrick@chromium.org2010-08-093-2/+30
| | | | | | | | | | | These are used by the default Chrome WebKit WebGL implementation. TEST=try BUG=none Review URL: http://codereview.chromium.org/3030053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55465 0039d316-1c4b-4281-b951-d872f2087c98
* De-wstringify gl_implementation.cc.evan@chromium.org2010-08-031-13/+12
| | | | | | Review URL: http://codereview.chromium.org/3085006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54819 0039d316-1c4b-4281-b951-d872f2087c98
* GPU command decoder uses depth24_stencil8_oes extension if available.apatrick@chromium.org2010-08-023-0/+21
| | | | | | | | | | | | | This is now the only depth / stencil format supported by ANGLE. Other GLES2 implementations will only use it if the extension is supported. Also changed all usage of GLES2_GPU_SERVICE_BACKEND_NATIVE_GLES2 to a runtime check since we no longer know at compile time whether the backend will be GL ot GLES2. TEST=try, GPU unit tests locally, WebGL locally, Pepper 3D locally BUG=none Review URL: http://codereview.chromium.org/3046035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54627 0039d316-1c4b-4281-b951-d872f2087c98
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-301-3/+5
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded headers from app/thestig@chromium.org2010-07-291-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2819063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54102 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Fix some NULL versus 0 issues to appease gcc-4.5.craig.schlenter@chromium.org2010-07-271-2/+2
| | | | | | | | | | | Patch is 99% the same as spotrh's version (thanks spot!) except for the use of gfx::kNullPluginWindow in this version. BUG=49533 Review URL: http://codereview.chromium.org/3014034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53788 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-269-0/+9
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Added --use-gl command line flag to select GL implementation.apatrick@chromium.org2010-07-1413-333/+700
| | | | | | | | | | | | - Options are desktop, egl and osmesa. - Also added support for bliting an OSMesa bask buffer to a GDK window. TEST=trybots, manual verification that WebGL and Pepper 3D work BUG=45898 Review URL: http://codereview.chromium.org/2825005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52388 0039d316-1c4b-4281-b951-d872f2087c98
* gpu: add GLES/EGL support on linuxpiman@chromium.org2010-06-216-32/+196
| | | | | | Review URL: http://codereview.chromium.org/2829007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50397 0039d316-1c4b-4281-b951-d872f2087c98
* Committing on behalf of p155off@gmail.com .kbr@google.com2010-06-152-1/+2
| | | | | | | | | | | | | Remove duplicated code in AcceleratedSurface using PbufferGLContext instead. This also fixes a crash caused by the OpenGL bindings not being initialized. BUG=46286 TEST=flash plugin 10.1 works again in both mac 10.5 and 10.6 Review URL: http://codereview.chromium.org/2782006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49836 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting checkin in rev 48521 as creating a child window for GL rendering ↵vangelis@chromium.org2010-06-101-63/+5
| | | | | | | | | | | | | creates more problems than it solves. Hopefully either we'll find a more elegant solution or the problem will go away with the introduction of ANGLE. This patch is identical to: http://codereview.chromium.org/2644001/show which was checked in and reverted due to a build failure (which I believe was unrelated) Review URL: http://codereview.chromium.org/2721001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49441 0039d316-1c4b-4281-b951-d872f2087c98
* Added EGL based GLContext.apatrick@chromium.org2010-06-0919-351/+2413
| | | | | | | | | | | | | | Python script to generate code to dynamically bind to GL functions (native GL, OSMesa, EGL or mock GL for unit tests). This replaces GLEW because GLEW doesn't bind to the GLES dialect of GL. Moved the mock GL code into app/gfx/gl. Updated the GPU code and AcceleratedSurface to use the new GL bindings. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/2134006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49332 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49066 - Reverting checkin in rev 48521 as creating a child window for ↵erg@chromium.org2010-06-071-5/+63
| | | | | | | | | | | | GL rendering creates more problems than it solves. Hopefully either we'll find a more elegant solution or the problem will go away with the introduction of ANGLE. Review URL: http://codereview.chromium.org/2644001 TBR=vangelis@chromium.org Review URL: http://codereview.chromium.org/2645007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49067 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting checkin in rev 48521 as creating a child window for GL rendering ↵vangelis@chromium.org2010-06-071-63/+5
| | | | | | | | | creates more problems than it solves. Hopefully either we'll find a more elegant solution or the problem will go away with the introduction of ANGLE. Review URL: http://codereview.chromium.org/2644001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49066 0039d316-1c4b-4281-b951-d872f2087c98
* Added warning if GLX version is less than 1.3. Pbuffers need GLX 1.3 and the ↵apatrick@chromium.org2010-05-281-0/+10
| | | | | | | | | | | pixmap fallback for 1.2 does not work on all systems. TEST=try BUG=none Review URL: http://codereview.chromium.org/2382002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48538 0039d316-1c4b-4281-b951-d872f2087c98
* Get the GPU process to create an additional window for the GL context in ordervangelis@chromium.org2010-05-281-7/+65
| | | | | | | | | to get window resizing to work. The new content window is a sibling of the hosting window but its position is set such that it renders on top of the host. BUG=44518 Review URL: http://codereview.chromium.org/2102009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48521 0039d316-1c4b-4281-b951-d872f2087c98
* Changed DLOG to LOG in gl_context_linux.cc to get informative errorkbr@google.com2010-05-241-19/+19
| | | | | | | | | | | messages even in release builds when WebGL initialization fails. BUG=44226 TEST=none Review URL: http://codereview.chromium.org/2110012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48045 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fallback to GLX Pixmaps when pbuffers aren't availablepiman@chromium.org2010-05-181-3/+159
| | | | | | Review URL: http://codereview.chromium.org/2129007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47484 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NULL vs 0 problems which break the build with -Werror using GCC 4.5evan@chromium.org2010-05-061-2/+2
| | | | | | | | | | | BUG=none TEST=try to compile with gcc 4.5 Patch by Benjamin Jemlich <pcgod99@gmail.com>. Review URL: http://codereview.chromium.org/2007003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46601 0039d316-1c4b-4281-b951-d872f2087c98
* OSMesa was not being correctly initialized when used with WebGL.apatrick@chromium.org2010-04-293-33/+21
| | | | | | | | | | | GLEW was not being initialized and the back buffer was not being cleared. Back buffer was not being deallocated in OSMesaGLContext::Destroy. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1792008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45958 0039d316-1c4b-4281-b951-d872f2087c98
* Pepper3D plugin tests enabled for Windows.apatrick@chromium.org2010-04-221-0/+4
| | | | | | | | | | | OSMesa (offscreen 3D renderer) allows us to now run these on the bots. Once OSMesa is working on linux and max, we can enable the tests for those platforms too. TEST=trybots, checked they fail when OSMesa is not built and pass when OSMesa is built BUG=none Review URL: http://codereview.chromium.org/1752006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45353 0039d316-1c4b-4281-b951-d872f2087c98
* Landing 45240 again.apatrick@chromium.org2010-04-227-0/+1526
| | | | | | | | | | | | | | GLContext implementations were dependent on some stuff in app/. Moved GLContext class to app/gfx/gl. Now it can be used by code outside of the gpu project, for example AcceleratedSurface. TEST=trybots, checkdeps BUG=none Review URL: http://codereview.chromium.org/1689006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45335 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/gfx/canvas and app/gfx/font to gfx/.ben@chromium.org2010-03-2313-2276/+1
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1132006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42312 0039d316-1c4b-4281-b951-d872f2087c98