diff options
author | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 10:03:37 +0000 |
---|---|---|
committer | sievers@chromium.org <sievers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 10:03:37 +0000 |
commit | 59fe2c3b8b23b8fe3631e8a53d7678d09ef2cb11 (patch) | |
tree | 8b43ced9cfb5834229880d25b452c643e0d249d8 | |
parent | 9f3809b09055f98e420d5528cdb4c4868ff8c504 (diff) | |
download | chromium_src-59fe2c3b8b23b8fe3631e8a53d7678d09ef2cb11.zip chromium_src-59fe2c3b8b23b8fe3631e8a53d7678d09ef2cb11.tar.gz chromium_src-59fe2c3b8b23b8fe3631e8a53d7678d09ef2cb11.tar.bz2 |
Change WGC3DInProcessCBImpl factories to return a base class pointer.
TBR=sky@chromium.org for ui/aura/bench/bench_main.cc
Review URL: https://chromiumcodereview.appspot.com/17447007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207782 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/test/layer_tree_pixel_test.cc | 8 | ||||
-rw-r--r-- | cc/test/pixel_test.cc | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/image_transport_factory.cc | 36 | ||||
-rw-r--r-- | content/browser/renderer_host/image_transport_factory_android.cc | 6 | ||||
-rw-r--r-- | content/common/gpu/client/gl_helper_benchmark.cc | 5 | ||||
-rw-r--r-- | content/common/gpu/client/gl_helper_unittests.cc | 5 | ||||
-rw-r--r-- | ui/aura/bench/bench_main.cc | 2 | ||||
-rw-r--r-- | ui/compositor/compositor.cc | 40 | ||||
-rw-r--r-- | ui/compositor/compositor.h | 10 | ||||
-rw-r--r-- | webkit/common/gpu/context_provider_in_process.cc | 5 | ||||
-rw-r--r-- | webkit/common/gpu/context_provider_in_process.h | 8 | ||||
-rw-r--r-- | webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 19 | ||||
-rw-r--r-- | webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h | 14 | ||||
-rw-r--r-- | webkit/support/test_webkit_platform_support.cc | 2 |
14 files changed, 86 insertions, 76 deletions
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index b948302..dd7eedf 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -50,11 +50,9 @@ scoped_ptr<OutputSurface> LayerTreePixelTest::CreateOutputSurface() { using WebKit::WebGraphicsContext3D; using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; - scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( + output_surface = make_scoped_ptr(new PixelTestOutputSurface( WebGraphicsContext3DInProcessCommandBufferImpl:: - CreateOffscreenContext(WebGraphicsContext3D::Attributes())); - output_surface = make_scoped_ptr( - new PixelTestOutputSurface(context3d.PassAs<WebGraphicsContext3D>())); + CreateOffscreenContext(WebGraphicsContext3D::Attributes()))); break; } } @@ -189,7 +187,7 @@ scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap( return scoped_ptr<SkBitmap>(); using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; - scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( + scoped_ptr<WebKit::WebGraphicsContext3D> context3d( WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( WebKit::WebGraphicsContext3D::Attributes())); diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 6e66002..5d02e58 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -142,7 +142,7 @@ void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; - scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d( + scoped_ptr<WebKit::WebGraphicsContext3D> context3d( WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( WebKit::WebGraphicsContext3D::Attributes())); output_surface_.reset(new PixelTestOutputSurface( diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc index 81e78ea..f1c3142 100644 --- a/content/browser/renderer_host/image_transport_factory.cc +++ b/content/browser/renderer_host/image_transport_factory.cc @@ -476,12 +476,12 @@ class BrowserCompositorOutputSurface public base::NonThreadSafe { public: BrowserCompositorOutputSurface( - WebGraphicsContext3DCommandBufferImpl* context, + scoped_ptr<WebKit::WebGraphicsContext3D> context, int surface_id, BrowserCompositorOutputSurfaceProxy* output_surface_proxy, base::MessageLoopProxy* compositor_message_loop, base::WeakPtr<ui::Compositor> compositor) - : OutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D>(context)), + : OutputSurface(context.Pass()), surface_id_(surface_id), output_surface_proxy_(output_surface_proxy), compositor_message_loop_(compositor_message_loop), @@ -619,23 +619,28 @@ class GpuProcessTransportFactory DCHECK(per_compositor_data_.empty()); } - virtual WebGraphicsContext3DCommandBufferImpl* CreateOffscreenContext() - OVERRIDE { + scoped_ptr<WebGraphicsContext3DCommandBufferImpl> + CreateOffscreenCommandBufferContext() { base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; return CreateContextCommon(swap_client, 0); } + virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() + OVERRIDE { + return CreateOffscreenCommandBufferContext() + .PassAs<WebKit::WebGraphicsContext3D>(); + } + virtual cc::OutputSurface* CreateOutputSurface( ui::Compositor* compositor) OVERRIDE { PerCompositorData* data = per_compositor_data_[compositor]; if (!data) data = CreatePerCompositorData(compositor); - WebGraphicsContext3DCommandBufferImpl* context = - CreateContextCommon(data->swap_client->AsWeakPtr(), - data->surface_id); BrowserCompositorOutputSurface* surface = new BrowserCompositorOutputSurface( - context, + CreateContextCommon(data->swap_client->AsWeakPtr(), + data->surface_id) + .PassAs<WebKit::WebGraphicsContext3D>(), per_compositor_data_[compositor]->surface_id, output_surface_proxy_.get(), base::MessageLoopProxy::current(), @@ -809,7 +814,7 @@ class GpuProcessTransportFactory return data; } - WebGraphicsContext3DCommandBufferImpl* CreateContextCommon( + scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContextCommon( const base::WeakPtr<WebGraphicsContext3DSwapBuffersClient>& swap_client, int surface_id) { WebKit::WebGraphicsContext3D::Attributes attrs; @@ -830,8 +835,8 @@ class GpuProcessTransportFactory attrs, false, CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)) - return NULL; - return context.release(); + return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); + return context.Pass(); } // Crash given that we are unable to show any UI whatsoever. On Windows we @@ -864,7 +869,7 @@ class GpuProcessTransportFactory virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d() OVERRIDE { - return make_scoped_ptr(factory_->CreateOffscreenContext()); + return factory_->CreateOffscreenCommandBufferContext(); } virtual void OnLostContext() OVERRIDE { @@ -908,7 +913,7 @@ class GpuProcessTransportFactory virtual scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext3d() OVERRIDE { - return make_scoped_ptr(factory_->CreateOffscreenContext()); + return factory_->CreateOffscreenCommandBufferContext(); } private: @@ -987,8 +992,9 @@ class SoftwareContextFactory : public ui::ContextFactory { public: SoftwareContextFactory() {} virtual ~SoftwareContextFactory() {} - virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE { - return NULL; + virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() + OVERRIDE { + return scoped_ptr<WebKit::WebGraphicsContext3D>(); } virtual cc::OutputSurface* CreateOutputSurface( ui::Compositor* compositor) OVERRIDE { diff --git a/content/browser/renderer_host/image_transport_factory_android.cc b/content/browser/renderer_host/image_transport_factory_android.cc index f2ab06c..c1ea043 100644 --- a/content/browser/renderer_host/image_transport_factory_android.cc +++ b/content/browser/renderer_host/image_transport_factory_android.cc @@ -45,7 +45,7 @@ class DirectGLImageTransportFactory : public ImageTransportFactoryAndroid { virtual GLHelper* GetGLHelper() OVERRIDE { return NULL; } private: - scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context_; + scoped_ptr<WebKit::WebGraphicsContext3D> context_; DISALLOW_COPY_AND_ASSIGN(DirectGLImageTransportFactory); }; @@ -54,8 +54,8 @@ DirectGLImageTransportFactory::DirectGLImageTransportFactory() { WebKit::WebGraphicsContext3D::Attributes attrs; attrs.shareResources = true; attrs.noAutomaticFlushes = true; - context_.reset(webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: - CreateViewContext(attrs, NULL)); + context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: + CreateViewContext(attrs, NULL); if (context_->makeContextCurrent()) context_->pushGroupMarkerEXT( base::StringPrintf("DirectGLImageTransportFactory-%p", this).c_str()); diff --git a/content/common/gpu/client/gl_helper_benchmark.cc b/content/common/gpu/client/gl_helper_benchmark.cc index b729ad2..193e836 100644 --- a/content/common/gpu/client/gl_helper_benchmark.cc +++ b/content/common/gpu/client/gl_helper_benchmark.cc @@ -62,9 +62,8 @@ class GLHelperTest : public testing::Test { protected: virtual void SetUp() { WebGraphicsContext3D::Attributes attributes; - context_.reset( - webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: - CreateOffscreenContext(attributes)); + context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: + CreateOffscreenContext(attributes); context_->makeContextCurrent(); helper_.reset(new content::GLHelper(context_.get())); diff --git a/content/common/gpu/client/gl_helper_unittests.cc b/content/common/gpu/client/gl_helper_unittests.cc index ec728e5..847a0cb 100644 --- a/content/common/gpu/client/gl_helper_unittests.cc +++ b/content/common/gpu/client/gl_helper_unittests.cc @@ -59,9 +59,8 @@ class GLHelperTest : public testing::Test { protected: virtual void SetUp() { WebGraphicsContext3D::Attributes attributes; - context_.reset( - webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: - CreateOffscreenContext(attributes)); + context_ = webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: + CreateOffscreenContext(attributes); context_->makeContextCurrent(); helper_.reset(new content::GLHelper(context_.get())); helper_scaling_.reset(new content::GLHelperScaling( diff --git a/ui/aura/bench/bench_main.cc b/ui/aura/bench/bench_main.cc index 7ddbc9e..81248d7 100644 --- a/ui/aura/bench/bench_main.cc +++ b/ui/aura/bench/bench_main.cc @@ -207,7 +207,7 @@ class WebGLBench : public BenchCompositorObserver { webgl_.SetBounds(bounds); parent_->Add(&webgl_); - context_.reset(ui::ContextFactory::GetInstance()->CreateOffscreenContext()); + context_ = ui::ContextFactory::GetInstance()->CreateOffscreenContext(); context_->makeContextCurrent(); texture_ = new WebGLTexture(context_.get(), bounds.size()); fbo_ = context_->createFramebuffer(); diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc index 3758a02..8d9c8b7 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc @@ -172,7 +172,7 @@ class ContextProviderFromContextFactory : public cc::ContextProvider { bool InitializeOnMainThread() { if (context3d_) return true; - context3d_.reset(factory_->CreateOffscreenContext()); + context3d_ = factory_->CreateOffscreenContext(); return !!context3d_; } @@ -201,11 +201,11 @@ bool DefaultContextFactory::Initialize() { cc::OutputSurface* DefaultContextFactory::CreateOutputSurface( Compositor* compositor) { - return new cc::OutputSurface( - make_scoped_ptr(CreateContextCommon(compositor, false))); + return new cc::OutputSurface(CreateContextCommon(compositor, false).Pass()); } -WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateOffscreenContext() { +scoped_ptr<WebKit::WebGraphicsContext3D> +DefaultContextFactory::CreateOffscreenContext() { return CreateContextCommon(NULL, true); } @@ -245,9 +245,9 @@ DefaultContextFactory::OffscreenContextProviderForCompositorThread() { void DefaultContextFactory::RemoveCompositor(Compositor* compositor) { } -WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateContextCommon( - Compositor* compositor, - bool offscreen) { +scoped_ptr<WebKit::WebGraphicsContext3D> +DefaultContextFactory::CreateContextCommon(Compositor* compositor, + bool offscreen) { DCHECK(offscreen || compositor); WebKit::WebGraphicsContext3D::Attributes attrs; attrs.depth = false; @@ -255,14 +255,14 @@ WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateContextCommon( attrs.antialias = false; attrs.shareResources = true; using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; - WebKit::WebGraphicsContext3D* context = - offscreen ? - WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( - attrs) : - WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( - attrs, compositor->widget()); + scoped_ptr<WebKit::WebGraphicsContext3D> context( + offscreen + ? WebGraphicsContext3DInProcessCommandBufferImpl:: + CreateOffscreenContext(attrs) + : WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( + attrs, compositor->widget())); if (!context) - return NULL; + return context.Pass(); CommandLine* command_line = CommandLine::ForCurrentProcess(); if (!offscreen) { @@ -272,7 +272,7 @@ WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateContextCommon( gl_context->SetSwapInterval(vsync ? 1 : 0); gl_context->ReleaseCurrent(NULL); } - return context; + return context.Pass(); } TestContextFactory::TestContextFactory() {} @@ -281,13 +281,15 @@ TestContextFactory::~TestContextFactory() {} cc::OutputSurface* TestContextFactory::CreateOutputSurface( Compositor* compositor) { - return new cc::OutputSurface(make_scoped_ptr(CreateOffscreenContext())); + return new cc::OutputSurface(CreateOffscreenContext()); } -WebKit::WebGraphicsContext3D* TestContextFactory::CreateOffscreenContext() { - ui::TestWebGraphicsContext3D* context = new ui::TestWebGraphicsContext3D; +scoped_ptr<WebKit::WebGraphicsContext3D> +TestContextFactory::CreateOffscreenContext() { + scoped_ptr<ui::TestWebGraphicsContext3D> context( + new ui::TestWebGraphicsContext3D); context->Initialize(); - return context; + return context.PassAs<WebKit::WebGraphicsContext3D>(); } scoped_refptr<Reflector> TestContextFactory::CreateReflector( diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index 9762bb6..67ee81b 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -82,7 +82,7 @@ class COMPOSITOR_EXPORT ContextFactory { // Creates a context used for offscreen rendering. This context can be shared // with all compositors. - virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() = 0; + virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() = 0; // Creates a reflector that copies the content of the |mirrored_compositor| // onto |mirroing_layer|. @@ -110,7 +110,8 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory { // ContextFactory implementation virtual cc::OutputSurface* CreateOutputSurface( Compositor* compositor) OVERRIDE; - virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE; + virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() + OVERRIDE; virtual scoped_refptr<Reflector> CreateReflector( Compositor* compositor, @@ -126,7 +127,7 @@ class COMPOSITOR_EXPORT DefaultContextFactory : public ContextFactory { bool Initialize(); private: - WebKit::WebGraphicsContext3D* CreateContextCommon( + scoped_ptr<WebKit::WebGraphicsContext3D> CreateContextCommon( Compositor* compositor, bool offscreen); @@ -147,7 +148,8 @@ class COMPOSITOR_EXPORT TestContextFactory : public ContextFactory { // ContextFactory implementation virtual cc::OutputSurface* CreateOutputSurface( Compositor* compositor) OVERRIDE; - virtual WebKit::WebGraphicsContext3D* CreateOffscreenContext() OVERRIDE; + virtual scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext() + OVERRIDE; virtual scoped_refptr<Reflector> CreateReflector( Compositor* mirrored_compositor, diff --git a/webkit/common/gpu/context_provider_in_process.cc b/webkit/common/gpu/context_provider_in_process.cc index 1545d3a..ee439e9 100644 --- a/webkit/common/gpu/context_provider_in_process.cc +++ b/webkit/common/gpu/context_provider_in_process.cc @@ -5,6 +5,7 @@ #include "webkit/common/gpu/context_provider_in_process.h" #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" +#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" namespace webkit { namespace gpu { @@ -60,9 +61,9 @@ bool ContextProviderInProcess::InitializeOnMainThread() { attributes.noAutomaticFlushes = true; using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; - context3d_.reset( + context3d_ = WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( - attributes)); + attributes); return context3d_; } diff --git a/webkit/common/gpu/context_provider_in_process.h b/webkit/common/gpu/context_provider_in_process.h index c863697..b87fc91 100644 --- a/webkit/common/gpu/context_provider_in_process.h +++ b/webkit/common/gpu/context_provider_in_process.h @@ -9,9 +9,12 @@ #include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "cc/output/context_provider.h" -#include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" #include "webkit/common/gpu/webkit_gpu_export.h" +namespace WebKit { +class WebGraphicsContext3D; +} + namespace webkit { namespace gpu { class GrContextForWebGraphicsContext3D; @@ -44,8 +47,7 @@ class WEBKIT_GPU_EXPORT ContextProviderInProcess virtual void OnMemoryAllocationChanged(bool nonzero_allocation); private: - scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> - context3d_; + scoped_ptr<WebKit::WebGraphicsContext3D> context3d_; scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_; base::Lock destroyed_lock_; diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 35b1f13..6641044 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -778,22 +778,25 @@ WebGraphicsContext3DInProcessCommandBufferImpl::EnableVirtualizedContext() { } // static -WebGraphicsContext3DInProcessCommandBufferImpl* +scoped_ptr<WebKit::WebGraphicsContext3D> WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext( const WebKit::WebGraphicsContext3D::Attributes& attributes, gfx::AcceleratedWidget window) { - if (!gfx::GLSurface::InitializeOneOff()) - return NULL; - return new WebGraphicsContext3DInProcessCommandBufferImpl( - attributes, false, window); + scoped_ptr<WebKit::WebGraphicsContext3D> context; + if (gfx::GLSurface::InitializeOneOff()) { + context.reset(new WebGraphicsContext3DInProcessCommandBufferImpl( + attributes, false, window)); + } + return context.Pass(); } // static -WebGraphicsContext3DInProcessCommandBufferImpl* +scoped_ptr<WebKit::WebGraphicsContext3D> WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( const WebKit::WebGraphicsContext3D::Attributes& attributes) { - return new WebGraphicsContext3DInProcessCommandBufferImpl( - attributes, true, gfx::kNullAcceleratedWidget); + return make_scoped_ptr(new WebGraphicsContext3DInProcessCommandBufferImpl( + attributes, true, gfx::kNullAcceleratedWidget)) + .PassAs<WebKit::WebGraphicsContext3D>(); } WebGraphicsContext3DInProcessCommandBufferImpl:: diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h index 88ace20..c095ee8 100644 --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h @@ -53,14 +53,12 @@ class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl // instances are created. Default value is false. static void EnableVirtualizedContext(); - static WebGraphicsContext3DInProcessCommandBufferImpl* - CreateViewContext( - const WebKit::WebGraphicsContext3D::Attributes& attributes, - gfx::AcceleratedWidget window); - - static WebGraphicsContext3DInProcessCommandBufferImpl* - CreateOffscreenContext( - const WebKit::WebGraphicsContext3D::Attributes& attributes); + static scoped_ptr<WebKit::WebGraphicsContext3D> CreateViewContext( + const WebKit::WebGraphicsContext3D::Attributes& attributes, + gfx::AcceleratedWidget window); + + static scoped_ptr<WebKit::WebGraphicsContext3D> CreateOffscreenContext( + const WebKit::WebGraphicsContext3D::Attributes& attributes); static void SetGpuMemoryBufferCreator(GpuMemoryBufferCreator* creator); diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc index e55e911..016661d 100644 --- a/webkit/support/test_webkit_platform_support.cc +++ b/webkit/support/test_webkit_platform_support.cc @@ -346,7 +346,7 @@ TestWebKitPlatformSupport::createOffscreenGraphicsContext3D( const WebKit::WebGraphicsContext3D::Attributes& attributes) { using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; return WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext( - attributes); + attributes).release(); } WebKit::WebGraphicsContext3DProvider* TestWebKitPlatformSupport:: |