diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 09:42:44 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 09:42:44 +0100 |
commit | a59391482883479a9b28a6f1ace6d1ebd08a7ecd (patch) | |
tree | fa539db054a20a67bff2fc891c33b0f4ec632916 /Source/WebKit/blackberry/Api/BackingStore.cpp | |
parent | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (diff) | |
download | qtwebkit-a59391482883479a9b28a6f1ace6d1ebd08a7ecd.tar.gz |
Imported WebKit commit 7bcdfab9a40db7d16b4b95bb77d78b8a59c9e701 (http://svn.webkit.org/repository/webkit/trunk@134025)
New snapshot with numerious build fixes, including MSVC 2012 and ARM Thumb-2.
Diffstat (limited to 'Source/WebKit/blackberry/Api/BackingStore.cpp')
-rw-r--r-- | Source/WebKit/blackberry/Api/BackingStore.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp index 0dac9cb31..0f078f5e3 100644 --- a/Source/WebKit/blackberry/Api/BackingStore.cpp +++ b/Source/WebKit/blackberry/Api/BackingStore.cpp @@ -206,6 +206,7 @@ BackingStorePrivate::BackingStorePrivate() , m_renderQueue(adoptPtr(new RenderQueue(this))) , m_defersBlit(true) , m_hasBlitJobs(false) + , m_webPageBackgroundColor(WebCore::Color::white) , m_currentWindowBackBuffer(0) , m_preferredTileMatrixDimension(Vertical) #if USE(ACCELERATED_COMPOSITING) @@ -409,7 +410,7 @@ void BackingStorePrivate::repaint(const Platform::IntRect& windowRect, if (render(rect)) { if (!shouldDirectRenderingToWindow() && !m_webPage->d->commitRootLayerIfNeeded()) blitVisibleContents(); - m_webPage->d->m_client->notifyContentRendered(rect); + m_webPage->d->m_client->notifyPixelContentRendered(rect); } } else m_renderQueue->addToQueue(RenderQueue::RegularRender, rect); @@ -2366,9 +2367,38 @@ void BackingStorePrivate::fillWindow(Platform::Graphics::FillPattern pattern, "Empty window buffer, couldn't fillWindow"); } + if (pattern == BlackBerry::Platform::Graphics::CheckerboardPattern && BlackBerry::Platform::Settings::isPublicBuild()) { + // For public builds, convey the impression of less checkerboard. + // For developer builds, keep the checkerboard to get it fixed better. + BlackBerry::Platform::Graphics::clearBuffer(dstBuffer, dstRect, + m_webPageBackgroundColor.red(), m_webPageBackgroundColor.green(), + m_webPageBackgroundColor.blue(), m_webPageBackgroundColor.alpha()); + return; + } + BlackBerry::Platform::Graphics::fillBuffer(dstBuffer, pattern, dstRect, contentsOrigin, contentsScale); } +WebCore::Color BackingStorePrivate::webPageBackgroundColorUserInterfaceThread() const +{ + ASSERT(BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()); + return m_webPageBackgroundColor; +} + +void BackingStorePrivate::setWebPageBackgroundColor(const WebCore::Color& color) +{ + if (!BlackBerry::Platform::userInterfaceThreadMessageClient()->isCurrentThread()) { + typedef void (BlackBerry::WebKit::BackingStorePrivate::*FunctionType)(const WebCore::Color&); + + BlackBerry::Platform::userInterfaceThreadMessageClient()->dispatchMessage( + BlackBerry::Platform::createMethodCallMessage<FunctionType, BackingStorePrivate, WebCore::Color>( + &BackingStorePrivate::setWebPageBackgroundColor, this, color)); + return; + } + + m_webPageBackgroundColor = color; +} + void BackingStorePrivate::invalidateWindow() { // Grab a rect appropriate for the current thread. @@ -2570,7 +2600,7 @@ void BackingStorePrivate::didRenderContent(const Platform::IntRect& renderedRect } else invalidateWindow(); - m_webPage->client()->notifyContentRendered(renderedRect); + m_webPage->client()->notifyPixelContentRendered(renderedRect); } BackingStore::BackingStore(WebPage* webPage, BackingStoreClient* client) |