Changeset 119185 in webkit
- Timestamp:
- May 31, 2012 6:37:40 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r119119 r119185 5665 5665 } 5666 5666 5667 void WebPagePrivate::setCompositor(PassRefPtr<WebPageCompositorPrivate> compositor )5667 void WebPagePrivate::setCompositor(PassRefPtr<WebPageCompositorPrivate> compositor, EGLContext compositingContext) 5668 5668 { 5669 5669 using namespace BlackBerry::Platform; … … 5672 5672 // safe access to m_compositor and its refcount. 5673 5673 if (!userInterfaceThreadMessageClient()->isCurrentThread()) { 5674 userInterfaceThreadMessageClient()->dispatchSyncMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, this, compositor)); 5674 // We depend on the current thread being the WebKit thread when it's not the Compositing thread. 5675 // That seems extremely likely to be the case, but let's assert just to make sure. 5676 ASSERT(webKitThreadMessageClient()->isCurrentThread()); 5677 5678 // This method call always round-trips on the WebKit thread (see WebPageCompositor::WebPageCompositor() and ~WebPageCompositor()), 5679 // and the compositing context must be set on the WebKit thread. How convenient! 5680 if (compositingContext != EGL_NO_CONTEXT) 5681 BlackBerry::Platform::Graphics::setCompositingContext(compositingContext); 5682 5683 userInterfaceThreadMessageClient()->dispatchSyncMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, this, compositor, compositingContext)); 5675 5684 return; 5676 5685 } -
trunk/Source/WebKit/blackberry/Api/WebPageCompositor.cpp
r118750 r119185 33 33 #include <BlackBerryPlatformMessage.h> 34 34 #include <BlackBerryPlatformMessageClient.h> 35 #include <EGL/egl.h> 35 36 #include <GenericTimerClient.h> 36 37 #include <ThreadTimerClient.h> … … 260 261 // needed. Unfortunately RefPtr<T> is not public, so we have declare to 261 262 // resort to manual refcounting. 262 webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), tmp ));263 webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), tmp, eglGetCurrentContext())); 263 264 } 264 265 … … 269 270 // If we're being destroyed before the page, send a message to disconnect us 270 271 if (d->page()) 271 webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), PassRefPtr<WebPageCompositorPrivate>(0) ));272 webKitThreadMessageClient()->dispatchMessage(createMethodCallMessage(&WebPagePrivate::setCompositor, d->page(), PassRefPtr<WebPageCompositorPrivate>(0), EGL_NO_CONTEXT)); 272 273 d->compositorDestroyed(); 273 274 d->deref(); -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r119119 r119185 25 25 #include "GLES2Context.h" 26 26 #include "LayerRenderer.h" 27 #include <EGL/egl.h> 27 28 #endif 28 29 #include "KURL.h" … … 394 395 bool isAcceleratedCompositingActive() const { return m_compositor; } 395 396 WebPageCompositorPrivate* compositor() const { return m_compositor.get(); } 396 void setCompositor(PassRefPtr<WebPageCompositorPrivate> );397 void setCompositor(PassRefPtr<WebPageCompositorPrivate>, EGLContext compositingContext); 397 398 bool createCompositor(); 398 399 void destroyCompositor(); -
trunk/Source/WebKit/blackberry/ChangeLog
r119134 r119185 1 2012-05-31 Arvid Nilsson <anilsson@rim.com> 2 3 [BlackBerry] WebGL and 2D canvas output not available to WebPageCompositor 4 https://bugs.webkit.org/show_bug.cgi?id=88012 5 6 Reviewed by George Staikos. 7 8 Properly set up resource sharing between WebKit thread EGL contexts and 9 the compositing thread EGL context, so the texture ID produced by WebGL 10 and 2D canvas makes sense to the compositing context. 11 12 There's no public API to supply an EGLContext yet, so we're lucky that 13 the embedder never makes its context un-current. Just grab the current 14 context on the compositing thread and use that as the compositing 15 context. 16 17 * Api/WebPage.cpp: 18 (BlackBerry::WebKit::WebPagePrivate::setCompositor): 19 * Api/WebPageCompositor.cpp: 20 (BlackBerry::WebKit::WebPageCompositor::WebPageCompositor): 21 (BlackBerry::WebKit::WebPageCompositor::~WebPageCompositor): 22 * Api/WebPage_p.h: 23 (WebPagePrivate): 24 1 25 2012-05-31 George Staikos <staikos@webkit.org> 2 26
Note: See TracChangeset
for help on using the changeset viewer.