Create the SharedGraphicsContext3D through its own method.
authordanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:35:26 +0000 (18:35 +0000)
committerdanakj@chromium.org <danakj@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:35:26 +0000 (18:35 +0000)
commit8fb94b48210147a1430354c13b4200ed35d6a0b5
tree2a1cf923e5fd7a976a42d147aa24ab1bc059f63a
parent04008f43b24a254320d4edfba90185fcac261db3
Create the SharedGraphicsContext3D through its own method.
https://bugs.webkit.org/show_bug.cgi?id=109345

Reviewed by James Robinson.

Source/Platform:

Add Platform API methods to get shared contexts from the embedder.

* chromium/public/Platform.h:
(Platform):
(WebKit::Platform::sharedOffscreenGraphicsContext3D):
(WebKit::Platform::sharedOffscreenGrContext):

Source/WebCore:

Allow creating a GraphicsContext3DPrivate from an externally owned
WebGraphicsContext3D and GrContext. Then create the shared graphics
context from these provided by the embedder.

This falls back to the old path if the new methods return NULL to
let us land this immediately and then transition the chromium side
over to this path.

* platform/chromium/support/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore):
(WebCore::GraphicsContext3DPrivate::createGraphicsContextFromExternalWebContextAndGrContext):
(WebCore::GraphicsContext3DPrivate::grContext):
* platform/chromium/support/GraphicsContext3DPrivate.h:
(GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::webContext):
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/Platform/ChangeLog
Source/Platform/chromium/public/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/support/GraphicsContext3DPrivate.cpp
Source/WebCore/platform/chromium/support/GraphicsContext3DPrivate.h
Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp