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/Source/Platform/chromium/public@144072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed
tree: a6acad0e2eb7cc0fcf7b3c0d3db263777147e915
  1. android/
  2. default/
  3. linux/
  4. mac/
  5. win/
  6. Platform.h
  7. WebAnimation.h
  8. WebAnimationCurve.h
  9. WebAnimationDelegate.h
  10. WebAudioBus.h
  11. WebAudioDestinationConsumer.h
  12. WebAudioDevice.h
  13. WebBlobData.h
  14. WebBlobRegistry.h
  15. WebCanvas.h
  16. WebClipboard.h
  17. WebColor.h
  18. WebCommon.h
  19. WebCompositorOutputSurface.h
  20. WebCompositorSupport.h
  21. WebContentLayer.h
  22. WebContentLayerClient.h
  23. WebCookie.h
  24. WebCookieJar.h
  25. WebCString.h
  26. WebData.h
  27. WebDiscardableMemory.h
  28. WebDragData.h
  29. WebExternalTextureLayer.h
  30. WebExternalTextureLayerClient.h
  31. WebFileInfo.h
  32. WebFileSystem.h
  33. WebFileUtilities.h
  34. WebFilterOperation.h
  35. WebFilterOperations.h
  36. WebFlingAnimator.h
  37. WebFloatAnimationCurve.h
  38. WebFloatKeyframe.h
  39. WebFloatPoint.h
  40. WebFloatQuad.h
  41. WebFloatRect.h
  42. WebGamepad.h
  43. WebGamepads.h
  44. WebGestureCurve.h
  45. WebGestureCurveTarget.h
  46. WebGraphicsContext3D.h
  47. WebGraphicsMemoryAllocation.h
  48. WebGraphicsMemoryStats.h
  49. WebHTTPBody.h
  50. WebHTTPHeaderVisitor.h
  51. WebHTTPLoadInfo.h
  52. WebImage.h
  53. WebImageLayer.h
  54. WebInputHandler.h
  55. WebInputHandlerClient.h
  56. WebIOSurfaceLayer.h
  57. WebLayer.h
  58. WebLayerScrollClient.h
  59. WebLayerTreeView.h
  60. WebLayerTreeViewClient.h
  61. WebLocalizedString.h
  62. WebMediaConstraints.h
  63. WebMediaStream.h
  64. WebMediaStreamCenter.h
  65. WebMediaStreamCenterClient.h
  66. WebMediaStreamSource.h
  67. WebMediaStreamSourcesRequest.h
  68. WebMediaStreamTrack.h
  69. WebMessagePortChannel.h
  70. WebMessagePortChannelClient.h
  71. WebMimeRegistry.h
  72. WebNonCopyable.h
  73. WebPluginListBuilder.h
  74. WebPoint.h
  75. WebPrerender.h
  76. WebPrerenderingSupport.h
  77. WebPrivateOwnPtr.h
  78. WebPrivatePtr.h
  79. WebRect.h
  80. WebReferrerPolicy.h
  81. WebRenderingStats.h
  82. WebRTCConfiguration.h
  83. WebRTCDataChannelHandler.h
  84. WebRTCDataChannelHandlerClient.h
  85. WebRTCDTMFSenderHandler.h
  86. WebRTCDTMFSenderHandlerClient.h
  87. WebRTCICECandidate.h
  88. WebRTCPeerConnectionHandler.h
  89. WebRTCPeerConnectionHandlerClient.h
  90. WebRTCSessionDescription.h
  91. WebRTCSessionDescriptionRequest.h
  92. WebRTCStatsRequest.h
  93. WebRTCStatsResponse.h
  94. WebRTCVoidRequest.h
  95. WebScreenInfo.h
  96. WebScrollbar.h
  97. WebScrollbarLayer.h
  98. WebScrollbarThemeGeometry.h
  99. WebScrollbarThemePainter.h
  100. WebSharedGraphicsContext3D.h
  101. WebSize.h
  102. WebSocketStreamError.h
  103. WebSocketStreamHandle.h
  104. WebSocketStreamHandleClient.h
  105. WebSolidColorLayer.h
  106. WebStorageArea.h
  107. WebStorageNamespace.h
  108. WebString.h
  109. WebThread.h
  110. WebThreadSafeData.h
  111. WebTransformAnimationCurve.h
  112. WebTransformationMatrix.h
  113. WebTransformKeyframe.h
  114. WebTransformOperations.h
  115. WebUnitTestSupport.h
  116. WebURL.h
  117. WebURLError.h
  118. WebURLLoader.h
  119. WebURLLoaderClient.h
  120. WebURLLoadTiming.h
  121. WebURLRequest.h
  122. WebURLResponse.h
  123. WebVector.h
  124. WebVideoFrame.h
  125. WebVideoFrameProvider.h
  126. WebVideoLayer.h
  127. WebWorkerRunLoop.h