diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-19 22:42:07 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-19 22:42:07 +0000 |
commit | f81e06c49bfb7cb5a7d12f71166b3d11d4ebee07 (patch) | |
tree | ebabb2cc58c91d7a5fb8ea3fc597e43555446a5a /content/common/gpu | |
parent | 818a91875ae90031ff2c76e32c34f79b4046ccf1 (diff) | |
download | chromium_src-f81e06c49bfb7cb5a7d12f71166b3d11d4ebee07.zip chromium_src-f81e06c49bfb7cb5a7d12f71166b3d11d4ebee07.tar.gz chromium_src-f81e06c49bfb7cb5a7d12f71166b3d11d4ebee07.tar.bz2 |
mac: Fix compositing readback in content shell drt mode
For GLES2DecoderImpl::HandleResizeCHROMIUM() to have an
effect with a background surface, resize_callback_ must be set.
It's only set when by ImageTransportHelper::Initialize(), so wrap
the mesa surface with a PassThroughImageTransportSurface()
which creates an ImageTransportHelper internally.
This is also what linux does, and it makes sense that
ImageTransportSurface::CreateSurface() should have to return a
real ImageTransportSurface, not just a general GLSurface.
(See also https://codereview.chromium.org/12315103 )
BUG=111316
TEST=
webkit/tools/layout_tests/run_webkit_tests.sh --driver-name 'Content Shell' --additional-drt-flag --dump-render-tree compositing/background-color/background-color-alpha.html
passes. Most compositing/ layout tests pass.
(At least once the DRT startup crash caused by r188777 is fixed.)
Review URL: https://codereview.chromium.org/12740012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu')
-rw-r--r-- | content/common/gpu/image_transport_surface_mac.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc index 7ebb04c..22a7460 100644 --- a/content/common/gpu/image_transport_surface_mac.cc +++ b/content/common/gpu/image_transport_surface_mac.cc @@ -465,6 +465,11 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( // baselines. So this is mostly a dummy surface. if (g_allow_os_mesa) { surface = new DRTSurfaceOSMesa(); + if (!surface || !surface->Initialize()) + return NULL; + + surface = new PassThroughImageTransportSurface( + manager, stub, surface.get(), /*is_transport=*/false); } else { NOTREACHED(); return NULL; |