diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 18:39:40 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 18:39:40 +0000 |
commit | 7d9ce4f8730d81751cbbfd057481d2de9ef111b5 (patch) | |
tree | fe4736374da78cef664dfe575b61e57c3cd327b2 /gpu/command_buffer/service/gpu_processor_linux.cc | |
parent | 4cff2151771dc748f2e0e24d82f72efc6ddf3809 (diff) | |
download | chromium_src-7d9ce4f8730d81751cbbfd057481d2de9ef111b5.zip chromium_src-7d9ce4f8730d81751cbbfd057481d2de9ef111b5.tar.gz chromium_src-7d9ce4f8730d81751cbbfd057481d2de9ef111b5.tar.bz2 |
Fixed loss of rendered output on Mac OS X if Pepper 3D application uses
framebuffer objects. Conditionalized allocation of FBO in
AcceleratedSurface class, and changed SwapBuffers to optionally copy from
the current context's back buffer. Changed GPUProcessor on Mac to always
use PbufferGLContext, and hooked in optional call to AcceleratedSurface's
SwapBufers before calling user's callback. Completely disabled
ViewGLContext on Mac OS X. This causes Pepper 3D applications to use the
GGL default back buffer on Mac, which is the desired behavior.
Ideally the FBO allocation would be factored out of the AcceleratedSurface
class, and ideally the pbuffer setup code would not be duplicated between
this class and PbufferGLContext. However, these cleanups are being deferred
because they require substantial refactorings.
Removed accelerated_surface_stub.cc, which isn't needed any more since
AcceleratedSurface moved to app/.
Tested:
- Pepper 3D plugin with glBindFramebuffer(GL_FRAMEBUFFER, 0) in place with
both IOSurface and TransportDIB code paths
- Unity 3D with IOSurface / Core Animation code path
BUG=41004
TEST=none (ran above tests)
Review URL: http://codereview.chromium.org/1637007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/gpu_processor_linux.cc')
-rw-r--r-- | gpu/command_buffer/service/gpu_processor_linux.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gpu/command_buffer/service/gpu_processor_linux.cc b/gpu/command_buffer/service/gpu_processor_linux.cc index 10f1a87..4217b72 100644 --- a/gpu/command_buffer/service/gpu_processor_linux.cc +++ b/gpu/command_buffer/service/gpu_processor_linux.cc @@ -57,4 +57,14 @@ bool GPUProcessor::Initialize(gfx::PluginWindowHandle window, return true; } +void GPUProcessor::Destroy() { + DestroyCommon(); +} + +void GPUProcessor::WillSwapBuffers() { + if (wrapped_swap_buffers_callback_.get()) { + wrapped_swap_buffers_callback_->Run(); + } +} + } // namespace gpu |